On 2025-04-23 14:16, Rainer Canavan wrote:
> 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
Downgrading only results in Connection: close unfortunately. I'll look
into mod_buffer, thanks!
/T