Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable "Transfer-Encoding:chunked" in Apache httpd

We are implementing some rest APIs using Apache httpd. We have one API which gives 9k buffer in response. Whenever our response goes over 8k then Apache will append "Transfer-Encoding:chunked" in response header and rest of response header will be discarded by Apache.

I want to disable "Transfer-Encoding:chunked" response header when our response buffer goes over 8K for retaining our useful response headers.

Can any one give me idea?

like image 984
Rahul R Dhobi Avatar asked Sep 02 '16 05:09

Rahul R Dhobi


1 Answers

mod_buffer can cause many responses to turn from chunked encoding to being sent with Content-Length. Generally it will be more efficient for whoever generates the response to buffer as much as needed to determine the length -- but mod_buffer can do it generically.

The reason it works is that mod_buffer stops the headers from being written/committed until the full length is known.

like image 92
covener Avatar answered Oct 14 '22 03:10

covener