Do not set the Content-Length on the download response

Authored by mollekopf on Mar 23 2023, 9:00 AM.



Seems related to:

Apparently swoole uses the chunked transfer encoding,
and according to the rfc we're not supposed to set Content-Length in
that case.

In any case with the Content-Length header swoole crashes, without
everything seems to work.

Diff Detail

rK kolab
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mollekopf requested review of this revision.Mar 23 2023, 9:00 AM
mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Mar 23 2023, 9:30 AM
machniak accepted this revision.Mar 23 2023, 11:51 AM
machniak added a subscriber: machniak.

I was thinking that we could do a separate code path for small files that has only one chunk and send Content-Length for them, but it could be done later and I didn't really tested that.

This revision is now accepted and ready to land.Mar 23 2023, 11:51 AM
Closed by commit rKccff16142c40: Do not set the Content-Length on the download response (authored by Christian Mollekopf <>). · Explain WhyMar 26 2023, 11:32 PM
This revision was automatically updated to reflect the committed changes.