[wp-trac] [WordPress Trac] #18525: zlib.output_compression "on" in server conflicts with autoupdate

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 6 18:54:34 UTC 2011


#18525: zlib.output_compression "on" in server conflicts with autoupdate
------------------------------------+------------------------------
 Reporter:  avidre                  |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  General                 |     Version:  3.2.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by kurtpayne):

 Replying to [comment:14 dd32]:
 > The bottom of the login page, as well as ajax loads are the main
 locations I see it. Ultimately, @ob_end_clean(); might be the best
 solution unfortunately.

 Thanks.  The ajax pages made the notices show up for me.  I was focused on
 the main pages and the installer/updater pages.

 I used `ob_list_handlers()`, `ob_get_status()`, and `ob_get_length()` to
 look at this a bit further.  It looks like there is data in the buffer
 (`ob_get_length()` returns > 0) and `ob_end_flush()` does end buffering
 (`ob_get_level()` doesn't result in an infinite loop) and put the data on
 the wire (you see it on the screen), but it doesn't completely ''flush''
 the buffer because the data isn't successfully deleted from the buffer,
 hence the notice.

 > Ultimately, @ob_end_clean(); might be the best solution unfortunately.
 I agree.  I don't see a way to code around this.  I couldn't find anything
 in php.net comments or on google either.

 I'm submitting a refactored version of the patch after testing it by
 stacking mod_deflate with with `ob_start("ob_gzhandler");`.
 `ob_gzhandler` sends its own headers, so it's not something that can be
 coded around.

 Reference: http://us.php.net/ob_gzhandler  second-to-last comment

   if you call ob_end_clean() after ob_start("ob_gzhandler"), the "Content-
 Encoding: gzip" header will still get sent (assuming the browser supports
 the encoding).  if you don't call ob_start() again with the ob_gzhandler
 callback function, the output will not be compressed, but the header will
 say it is.  this causes mozilla (as of build 2002032808) to display a
 blank page.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18525#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list