You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Topher Fischer <ja...@cs.byu.edu> on 2007/03/05 22:52:15 UTC

Content-Encoding: identity

Here's the deal.  I'm behind a proxy/web filter (squid/dansguardian). The proxy is making requests on behalf of our users, and it uses "Accept-Encoding: identity" in its HTTP request to an Apache 2.2.4 server.  When the reply comes back from the webserver, it has both "Content-Encoding:
identity" and "Content-Encoding: gzip" listed in the HTTP headers (in that order).  This is confusing Firefox.  It expects the page to be in the "identity" form, but it's gzip'd, so when it prints it to the screen, it's all gzip'd nonsense.

I went to go submit this according to the instructions under "Bug Reporting", but I can't try to verify it against the most recent version of Apache.  Can anybody else verify this or just let me know if it's a bug?

Here's a link (out in the wild) that presents the problem for me:
http://123.writeboard.com/7073db1f9c99afa89/login

-- 
Topher Fischer
GnuPG Fingerprint: 3597 1B8D C7A5 C5AF 2E19  EFF5 2FC3 BE99 D123 6674
javert42@cs.byu.edu



Re: Content-Encoding: identity

Posted by Nick Kew <ni...@webthing.com>.
On Mon, 05 Mar 2007 16:18:30 -0700
Topher Fischer <ja...@cs.byu.edu> wrote:

> That field exists in the reply from the webserver, and the reply given
> from the proxy to the client.
> 
> Just to clarify: Here's what goes out from the proxy:
> Accept-Encoding: identity,gzip,deflate
> 
> And here's what comes back:
> Content-Encoding: identity
> ...
> Content-Encoding: gzip

cg-eye confirms this at your server, but I can't reproduce
it on mine.  There's certainly a bug somewhere, but it's
not clear whether Apache is guilty of anything, or whether
it's entirely third-party stuff.

Round tuits permitting, we might check the logic in mod_deflate.
It looks as if it'll remove itself if an "identity" token is
found, which raises the question: are you running anything else
that might compress responses - for example, within your
login script?

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

Re: Content-Encoding: identity

Posted by Ruediger Pluem <rp...@apache.org>.

On 03/06/2007 12:18 AM, Topher Fischer wrote:

> 
> Just to clarify: Here's what goes out from the proxy:
> Accept-Encoding: identity,gzip,deflate
> 
> And here's what comes back:
> Content-Encoding: identity
> ...
> Content-Encoding: gzip
> 
> ... and the reply is gzip'd.  The server is running mod_fastcgi and

Who does gzip the content? mod_deflate or your application?

> mod_ssl.  Do you have a good way of tweaking your client's HTTP headers
> in the request?  I could probably try to test this against a new apache
> build tomorrow, but I don't know a good way to control what gets put in
> the request header.

http://httpd.apache.org/docs/2.2/en/mod/mod_headers.html can be your friend in this case.

Regards

Rüdiger



Re: Content-Encoding: identity

Posted by Topher Fischer <ja...@cs.byu.edu>.
Ruediger Pluem wrote:
> On 03/05/2007 10:52 PM, Topher Fischer wrote:
>   
>> Here's the deal.  I'm behind a proxy/web filter (squid/dansguardian). The proxy is making requests on behalf of our users, and it uses "Accept-Encoding: identity" in its HTTP request to an Apache 2.2.4 server.  When the reply comes back from the webserver, it has both "Content-Encoding:
>> identity" and "Content-Encoding: gzip" listed in the HTTP headers (in that order).  This is confusing Firefox.  It expects the page to be in the "identity" form, but it's gzip'd, so when it prints it to the screen, it's all gzip'd nonsense.
>>     
>
> I cannot reproduce this. Do you use any third party modules in your httpd?
> Do you see Content-Encoding: identity really in the reply from the webserver or can it only be seen in the reply from
> the proxy?
>
>
> Regards
>
> Rüdiger
>
>   
That field exists in the reply from the webserver, and the reply given
from the proxy to the client.

Just to clarify: Here's what goes out from the proxy:
Accept-Encoding: identity,gzip,deflate

And here's what comes back:
Content-Encoding: identity
...
Content-Encoding: gzip

... and the reply is gzip'd.  The server is running mod_fastcgi and
mod_ssl.  Do you have a good way of tweaking your client's HTTP headers
in the request?  I could probably try to test this against a new apache
build tomorrow, but I don't know a good way to control what gets put in
the request header.

-- 
Topher Fischer
GnuPG Fingerprint: 3597 1B8D C7A5 C5AF 2E19  EFF5 2FC3 BE99 D123 6674
javert42@cs.byu.edu



Re: Content-Encoding: identity

Posted by Ruediger Pluem <rp...@apache.org>.

On 03/05/2007 10:52 PM, Topher Fischer wrote:
> Here's the deal.  I'm behind a proxy/web filter (squid/dansguardian). The proxy is making requests on behalf of our users, and it uses "Accept-Encoding: identity" in its HTTP request to an Apache 2.2.4 server.  When the reply comes back from the webserver, it has both "Content-Encoding:
> identity" and "Content-Encoding: gzip" listed in the HTTP headers (in that order).  This is confusing Firefox.  It expects the page to be in the "identity" form, but it's gzip'd, so when it prints it to the screen, it's all gzip'd nonsense.

I cannot reproduce this. Do you use any third party modules in your httpd?
Do you see Content-Encoding: identity really in the reply from the webserver or can it only be seen in the reply from
the proxy?


Regards

Rüdiger