The mod_deflate documentation contains this warning:

> Note on Content-Length
>
> If you evaluate the request body yourself, don't trust the Content-Length 
> header!
> The Content-Length header reflects the length of the incoming data from the 
> client
> and not the byte count of the decompressed data stream.

Unfortunately, the HTTP/1.1 standard doesn't provide any HTTP header to
contain the lenght of the original content before encoding.

But the HTTP/1.1 standard doesn't prevent anyone from inventing proprietary
HTTP headers, as long as these are prefixed by "X-".

So would it be a reasonable idea to make Apache generate some header like
"X-Content-length-decoded" and make this one contain the original 
"Content-length"
before any HTTP content encoding is to be applied?
(The header would only be sent if a content encoding been applied, of course.)

This would then provide the information that "Content-Length" does not provide
(i e. serve as buffer size for the decoding application etc.).
And the warning could then reformulated such as to explain the difference
between "Content-lenght" and the new "X-Content-length-decoded" header.

Regards, Michael

P.S.: Of course mod_gzip would be happy to support this mechanism as well,
so if Apache would implement it, mod_gzip would try to be compatible to it;
yet, mod_gzip wouldn't dare to invent such a thing on its own...


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to