mod_xsendfile does by default drop the header "Content-Encoding". And unfortunately it does not add it either. So one cannot serve for example gzip files.
Quote from https://tn123.org/mod_xsendfile/beta/ :
So for first time I tried to modify a port, and luckily this was simple.
I simply uncommented this 2 lines in mod_xsendfile.c:
And its working as expected, the header I set is kept, and the Browser knows what todo with it.
So now I wonder, how do I get this patch into the world?
And probably this should be improved by either being optional in make configure, or an extra parameter for PHP, as it might break some apps relying on that.
Quote from https://tn123.org/mod_xsendfile/beta/ :
The Content-Encoding header - if present - will be dropped, as the module cannot know if it was set by intention of the programmer or the handler. E.g. php with output compression enabled will set this header, but the replacement file send via mod_xsendfile is most likely not compressed.
So for first time I tried to modify a port, and luckily this was simple.
I simply uncommented this 2 lines in mod_xsendfile.c:
Code:
apr_table_unset(r->headers_out, "Content-Encoding");
apr_table_unset(r->err_headers_out, "Content-Encoding");
And its working as expected, the header I set is kept, and the Browser knows what todo with it.
So now I wonder, how do I get this patch into the world?
And probably this should be improved by either being optional in make configure, or an extra parameter for PHP, as it might break some apps relying on that.