The Rack::Chunked middleware conflict with the Rack::Sendfile middleware / approach.
The Rack::Chunked doesn't test if the 'X-Sendfile' header family is set, adding the chunked transfer encoding header.
This results in two possible approaches:
-
The server ignores any headers set by the application (losing any cookie data or other custom headers).
-
The encoding header remains intact*, causing the response to fail.
Both approaches result in loss of data (either the cookie data or a failed response).
The best way to fix the issue might be to add tests to the Rack::Chunked middleware, testing for the 'X-Sendfile' header family.
* Consider that the header might have been Transfer-Encoding: gzip and the file X-sendfile: style.css.gz, which means that the header should have remained intact.
This issue originated here.
The Rack::Chunked middleware conflict with the Rack::Sendfile middleware / approach.
The Rack::Chunked doesn't test if the
'X-Sendfile'header family is set, adding the chunked transfer encoding header.This results in two possible approaches:
The server ignores any headers set by the application (losing any cookie data or other custom headers).
The encoding header remains intact*, causing the response to fail.
Both approaches result in loss of data (either the cookie data or a failed response).
The best way to fix the issue might be to add tests to the Rack::Chunked middleware, testing for the
'X-Sendfile'header family.* Consider that the header might have been
Transfer-Encoding: gzipand the fileX-sendfile: style.css.gz, which means that the header should have remained intact.This issue originated here.