ID:               48725
 Updated by:       [email protected]
 Reported By:      slusarz at curecanti dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         Streams related
 Operating System: Linux
 PHP Version:      5.2.10
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:
------------------------------------------------------------------------

[2009-06-29 20:03:00] slusarz at curecanti dot org

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 this bug report at http://bugs.php.net/?id=48725&edit=1

Reply via email to