note 97385 added to function.ob-gzhandler

From: Date: Fri, 16 Apr 2010 23:17:57 +0000
Subject: note 97385 added to function.ob-gzhandler
Groups: php.notes 
Request: Send a blank email to php-notes+get-168336@lists.php.net to get a copy of this message
I've just spent 5 hours fighting a bug in my application and outcome is: <?php // do not use ob_start("ob_gzhandler"); // along with header('HTTP/1.1 304 Not Modified'); // or in the end use ob_end_clean(); ?> W3C Standart requires response body to be empty if 304 header set. With compression on it will at least contain a gzip stream header even if your output is completely empty! This affects firefox (current ver.3.6.3) in a very subtle way: one of the requests after the one that gets 304 with not empty body gets it response prepended with contents of that body. In my case it was a css file and styles was not rendered at all, which made problem show up. ---- Server IP: 69.147.83.197 Probable Submitter: 94.228.169.89 ---- Manual Page -- http://www.php.net/manual/en/function.ob-gzhandler.php Edit -- https://master.php.net/note/edit/97385 Del: integrated -- https://master.php.net/note/delete/97385/integrated Del: useless -- https://master.php.net/note/delete/97385/useless Del: bad code -- https://master.php.net/note/delete/97385/bad+code Del: spam -- https://master.php.net/note/delete/97385/spam Del: non-english -- https://master.php.net/note/delete/97385/non-english Del: in docs -- https://master.php.net/note/delete/97385/in+docs Del: other reasons-- https://master.php.net/note/delete/97385 Reject -- https://master.php.net/note/reject/97385 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168336) next »