Making HEAD requests to a page which has had output buffering activated just
results in the connection being closed with no response. This makes it
pretty unusable. Can anyone else reproduce this problem?
Two scripts:
nobuffer.php:
<? print "hello world!"; ?>
buffer.php:
<? ob_start(); print "hello buffered world!"; ob_end_flush(); ?>
nobuffer.php responds to the GET/HEAD requests fine.
buffer.php responds correctly to the GET, but not the HEAD.
Transcript is below:
[avsm@brick /]$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /~avsm/nobuffer.php HTTP/1.1
Host: localhost
HTTP/1.1 200 OK
Date: Thu, 29 Mar 2001 22:48:24 GMT
Server: Apache/1.3.12 (Unix) PHP/4.0.5RC2 mod_ssl/2.6.6 OpenSSL/0.9.5a
X-Powered-By: PHP/4.0.5RC2
Transfer-Encoding: chunked
Content-Type: text/html
c
hello world!
0
[avsm@brick /]$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD /~avsm/nobuffer.php HTTP/1.1
Host: localhost
HTTP/1.1 200 OK
Date: Thu, 29 Mar 2001 22:49:00 GMT
Server: Apache/1.3.12 (Unix) PHP/4.0.5RC2 mod_ssl/2.6.6 OpenSSL/0.9.5a
X-Powered-By: PHP/4.0.5RC2
Content-Type: text/html
[avsm@brick /]$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /~avsm/buffer.php HTTP/1.1
Host: localhost
HTTP/1.1 200 OK
Date: Thu, 29 Mar 2001 22:49:34 GMT
Server: Apache/1.3.12 (Unix) PHP/4.0.5RC2 mod_ssl/2.6.6 OpenSSL/0.9.5a
X-Powered-By: PHP/4.0.5RC2
Transfer-Encoding: chunked
Content-Type: text/html
15
hello buffered world!
0
[avsm@brick /]$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD /~avsm/buffer.php HTTP/1.1
Host: localhost
Connection closed by foreign host.
I'll upgrade to RC4 in a bit and check if that makes a difference (not seen
the ChangeLogs between them yet)
(Platform is OpenBSD-2.8-stable). There is nothing in the Apache error log.
Anil
--
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]