httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael.Schro...@telekurs.de
Subject mod_deflate: some suggestion (maybe even a feature request?)
Date Tue, 09 Dec 2003 16:19:06 GMT

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: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message