> From: Erik Thuning <thun...@dsv.su.se> [...] > I have an apache server running as reverse proxy for a tomcat > application using mod_proxy_ajp. An external application pulling data > from mine has a hard requirement to get a content-length header in the > response and won't accept transfer-encoding=chunked. Tomcat is setting > content-length as expected, but apache replaces it with > transfer-encoding=chunked in its response.
> How can I make apache stop switching these headers (and presumably stop > streaming the response)? Preferrably only for a specified path > (/divaexport), since the application is large and only a tiny portion > has this content-length requirement. Since chunked encoding is an integral part of HTTP/1.1, try setting downgrade-1.0 and/or force-response-1.0 using BrowserMatch if possible (see https://httpd.apache.org/docs/2.4/env.html), but I'm not sure if that will result a Content-Length header or a simple Connection: close in this case. If you really need the Content-Length, mod_buffer may be useful. Rainer — DISCLAIMER — This email and any attachments may contain confidential information and are intended solely for the recipient. If you are not the intended recipient, please delete it and notify the sender. Unauthorized use or disclosure is prohibited. Please note that the footer may include automatically added classification labels. These labels reflect internal handling guidelines and do not affect legal obligations.