Welcome! Log In Create A New Profile

Advanced

mod_gzip with php

Roman Vasilyev
June 30, 2010 06:40PM
Hello,

I found strange behavior for php scripts.
when server request is HEAD, I can see some garbage in response.
=========================
HEAD /server.php HTTP/1.1
Host: www.rss2search.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6)
Gecko/20100625 Firefox/3.6.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

HTTP/1.1 200 OK
Server: nginx/0.8.39
Date: Wed, 30 Jun 2010 20:00:33 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.1.6
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"
Content-Encoding: gzip

.....................
this noneprintable bytes is: 1F8B080000000000000303000000000000000000

Helped to fix that disabling mod_gzip for HEAD requests in fastcgi.conf.
if ( $request_method = HEAD ) {
gzip off;
}

Is this behavior expectible, if so, what best way for nginx.conf to fix
this problem?

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

mod_gzip with php

Roman Vasilyev June 30, 2010 06:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready