From:             slusarz at curecanti dot org
Operating system: Linux
PHP version:      5.2.10
PHP Bug Type:     Streams related
Bug description:  Support for flushing in zlib stream(?)

Description:
------------
There does not seem to be any support for flushing data in a zlib
compression stream.  Not sure if this is an omission, something obvious
that I am missing (and may not be in the documentation), or the fact that
the zlib stream filter does not support socket operation.

Reproduce code:
---------------
$stream = stream_socket_client([...]);

// Login to remote server & enable compression remotely (e.g.
implementation of IMAP COMPRESS extension - RFC 4978)

stream_filter_append($stream, 'zlib.deflate', STREAM_FILTER_WRITE);
stream_set_write_buffer($stream, 0);
fwrite($stream, 'Testing');
fflush($stream);

// tcpdump confirms that nothing is sent from the PHP server to the remote
server.  Can confirm that upon socket timeout, the pending data is sent.

// Similarly, compressed data from incoming stream is not available
either.
stream_filter_append($stream, 'zlib.inflate', STREAM_FILTER_READ);
$in = fread($stream, 8192);

// fread() on $stream will timeout.


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

Reply via email to