A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearStrange http gzip issue - page 1
User InfoPosts
Strange http gzip issue#1
Here(s a strange one:

I(ve got nginx reverse proxying requests to apache 2 with mod_php.

A user (using firefox 3.1b3) reported that recently, he(s started getting sporadic "What should firefox do with this file?" popups during normal navigation. We haven(t had any other reports of this issue, and haven(t been able to reproduce it ourselves.

I checked Nginx and apache(s logs. Nothing in the error logs, and they both show a normal HTTP 200 for the request.

I had him send me the downloaded file, and it(s generated HTML, as it should be -- except it has some trailing and leading bytes tacked on.

The opening byte sequence is the magic gzip header: 1F8B08

Here are the opening characters, C-escaped for convenience:

\x1F\x8B\x089608\r\n<!DOCTYPE HTML ...

and the file ends with:


When I fetch the same URL via wget, it starts with as expected; the mysterious opening and closing bytes are nowhere to be seen.

Has anyone ever seen anything similar to this? Could this be a FF 3.1b3 bug?

posted date: 2009-04-09 18:07:00

Re: Strange http gzip issue#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-09 18:07:01

Re: Strange http gzip issue#3
Never seen an issue exactly like that, but I did have an issue once with a transparent proxy that would claim to the web server that it could handle gzip compressed content when, in fact, it received the gzipped content from the server, stripped the gzip headers without decompressing it, and sent the result to the browser. The behavior we saw was what you describe: a save/open file dialog for what should have been a normal web page. In this case the browser in question was IE.I(m not sure if you(re problem is related, but as an experiment, you could look at the requests between the proxy and Apache and see if they are gzipped, or else turn off the gzip compression for requests in Apache and see if that fixes the issue. If so, then you probably have a problem with gzip handling in your proxy.

posted date: 2009-04-10 07:08:00

Re: Strange http gzip issue#4
I'm with jbourque on this one... it doesn't sound like a browser bug if there is content being added to the stream. Check to see if you have any gzip handlers enabled in your PHP ini, and also check to see if you have mod_deflate running on apache, and verify it's settings.

posted date: 2009-04-10 09:37:00

Re: Strange http gzip issue#5
wget doesn(t request a compressed response. Try: curl --compressed <URL>You could also try adding a -v to print the response headers, and check that a sensible Content-Type is being returned.

posted date: 2009-05-04 03:50:00

select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.