Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header Content-Length is not emitted for attachments #1425

Closed
bschmalhofer opened this issue Nov 19, 2021 · 1 comment
Closed

Header Content-Length is not emitted for attachments #1425

bschmalhofer opened this issue Nov 19, 2021 · 1 comment

Comments

@bschmalhofer
Copy link
Contributor

While looking into how to serve attachments as file handles, I found that for attachments the header 'Content-Length' was no longer added. There was only the incorrect comment:

# Content-Length will be added in Finalize()

This should be fixed using the function Plack::Util::content_length() in order to allow for file handles as response body.

Originally posted by @bschmalhofer in #1397 (comment)

bschmalhofer added a commit that referenced this issue Nov 19, 2021
adding namespace::autoclean and explicitly import the used functions
bschmalhofer added a commit that referenced this issue Nov 19, 2021
Because that header was set in OTOBO 10.0.x.
Use Plack::Util::content_length() for determining the length, because in future the content
may be a file handle.
bschmalhofer added a commit that referenced this issue Nov 19, 2021
@bschmalhofer
Copy link
Contributor Author

Content-Length is set new. Checked with Firefox Developer Tools. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant