PHP 4.0 Bug #2497: header("Connection: keep-alive") has "close" appended?
| From: | medavid at ix dot netcom dot com | Date: | Tue, 12 Oct 1999 08:01:20 +0000 |
| Subject: | PHP 4.0 Bug #2497: header("Connection: keep-alive") has "close" appended? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11703@lists.php.net to get a copy of this message | ||
From: medavid@ix.netcom.com
Operating system: Linux 2.2.10
PHP version: 4.0 Beta 2
PHP Bug Type: Other
Bug description: header("Connection: keep-alive") has "close" appended?
I am running PHP 4.0B2 as a module in Apache (1.3.6) (./configure --with-mysql --enable-track-vars
--with-apache=../apache-1.3.6). The specific distribution is SuSE 6.2.
Here's the problem (I think it's a bug, but I'm not sure; I haven't been able to
find any concrete information on this)... I have a client that calls a PHP script, and specifies
"Connection: Keep-Alive" in the GET stream. This client is using HTTP/1.0.
The PHP script attempts to also keep "keep-alive" turned on by having a
"header("Connection: Keep-alive")" at the very top of the script.
However, what gets sent back to the client is "Connection: Keep-alive, close". It seems
that PHP is always closing the connection after the script finishes executing.
I've tested this in various ways. If I don't invoke a PHP script, the client's
keep-alive works and the connection stays active.
I've noticed that PHP 3 just plain *ignores* the keep-alive; in other words, it *always*
inserts a "Connection: close" in the return stream.
Is this the way it's supposed to work? Shouldn't PHP leave the "Connection:"
alone if a script specifies one?
Thanks, and if this isn't a bug, I apologize.
Mark