From:             [EMAIL PROTECTED]
Operating system: linux
PHP version:      4.0.6
PHP Bug Type:     Output Control
Bug description:  limitations of php://stdout

With perl cgi I can create a GZIP output stream
to a Java applet as follows:

print("Content-type: application/x-gzip\n\n");
my $gz=gzopen(\*STDOUT, "wb") || die("gasp!");   

however, the same technique seems to be impossible
with php://stdout.  i realize that i can open
a gzip'd stream as follows (note: i am using php 4.02):

gzopen("php://stdout","w");

however, there seems to be no way to get header fields
(uncompressed) to precede the gzip'd output.  this 
presents an unresolvable problem on the browser side,
because some browsers will assume that no data has been
sent if no header fields are received.

can the php://stdout mechanism be changed to allow me
to print uncompressed lines to stdout before the compressed
output begins?  am i missing something here?  i realize
that i can put zipped data into a file and use readfile()
to send it, and this actually does send all the header
fields as would be expected. however, this will cause
me unnecessary drive activity because i will have to modify
the files, which i had not wanted to do.
-- 
Edit bug report at: http://bugs.php.net/?id=12022&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to