On Thu, Oct 9, 2008 at 15:54, Andrej van der Zee <[EMAIL PROTECTED]> wrote: > Hi, > >> >> No, the Content-Length doesn't include the size of the headers. >> > > Yes of course, but you could add the length of all r->headers_in.
It's not very reliable. In headers_out you have things like "key" and "value", while the resulting header is "key: value\r\n". Then, I am not sure if the ap_http_header_filter that transforms the apr_table_t *headers_out to strings changes/inserts headers. Then there are two other filters, the byte-range and the content-length filter. The content-length filter sets the value of the Content-Length header while I don't know what the byte-range filter does (maybe it is applicable in the case of chunked transport). You would need to count the size of the headers_out _after_ such filters alter the headers. So... too hairy. > I just wondered if the content-type reflects the actual size, for > example if the request is compressed. If the request is compressed, Content-Length indicates the length of the _compressed_ body. Content-Type should stay unmodified regardless if the body is compressed or not. However, a compressed body is flagged by the "Content-Encoding: gzip" header (or "deflate"). S