From:             
Operating system: irrelevant
PHP version:      5.2.13
Package:          Unknown/Other Function
Bug Type:         Feature/Change Request
Bug description:ob_gzhandler/header("304") incompatibility

Description:
------------
test script below will produce a response with not empty body (it will
contain gzip stream header) which breaks the W3C standart that requires 304
response to have empty body.



The idea was to speed up things with compression and leveraging client side
caching, but end up firefox (v.3.6.3) prepending with that body some of
conseqent responces (css file in my case, which broken styles rendering -
that was really really hard to find - i just coudn't understand why my
server returns corrupted file and only to firefox)



Test script:
---------------
<?php

ob_start("ob_gzhandler");

header('HTTP/1.1 304 Not Modified');

ob_end_flush();

?>

Expected result:
----------------
ob_gzhandler() to look into response headers and wipe out buffer and
disable compression if 304 is set. Cause it's a subtle thing about 304
header, its body and the way ob_gzhandler() works and others can run into
same problem while trying to speed up website as compression and
client-side caching are 2 main things to do.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=51579&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51579&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51579&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51579&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51579&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51579&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51579&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51579&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51579&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51579&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51579&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51579&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51579&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51579&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51579&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51579&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51579&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51579&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51579&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51579&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51579&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51579&r=mysqlcfg

Reply via email to