How to disable Content-Length response header using Apache?

Let me preface this question by stating that I want to temporarily disable the title and be fully aware of the consequences for browsers, caching mechanisms, etc., if the title is missing.

I need to check the caching behavior if the header is Content-Lengthmissing from the HTTP response. Is there a way to disable the header?

My first attempt was to simply install it on 0using PHP and header("Content-Length: 0", true);, but it’s not the same as completely removing the header from the response.

Can I disable / delete the title?

+3
source share
1 answer

Content-Length - -, RFC 2616 (HTTP 1.1), . , -, , , .

, HTTP- Apache /http/http _filters.c. Content-Length , ( 1255). , .

- Apache, , RFC 2616.

+2

Source: https://habr.com/ru/post/1788896/


All Articles