#23602 [Bgs]: Compile error related to readlin

From: Date: Tue, 20 May 2003 13:15:36 +0000
Subject: #23602 [Bgs]: Compile error related to readlin
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40038@lists.php.net to get a copy of this message
ID: 23602 User updated by: hz11 at nyu dot edu -Summary: Can't Force HTTP/1.0 Over HTTP/1.1 -Reported By: hans at nyu dot edu +Reported By: hz11 at nyu dot edu Status: Bogus Bug Type: HTTP related -Operating System: FreeBSD 4.7 +Operating System: FreeBSD 4.6.2-RELEASE -PHP Version: 4.3.2RC2 +PHP Version: 4.2.2 New Comment: Thank you for the clarification. As I had considered at first, http://httpd.apache.org/docs/env.html is the only way to handle this. My thinking that it was a PHP issue was due to the fact that when setting a header the complete change wasn't occurring, and http://lxr.php.net/source/php4/main/SAPI.c#542 furthered this. Whether considering only the status, if in fact forcing the protocol is even possible, is another issue, of which I won't get involved in :) Thank you, Hans Previous Comments: ------------------------------------------------------------------------ [2003-05-19 20:07:55] sniper@php.net Not PHP problem, Apache replies with HTTP/1.1 always. (I disabled PHP from my installation and it still says HTTP/1.1 for HTTP/1.0 request) ------------------------------------------------------------------------ [2003-05-19 10:05:15] hans at nyu dot edu I believe this is a bug in PHP, or at least in how it writes headers through SAPI.c, and is not related to RFC2616 Upgrade/Switch behavior (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.42). I believe this problem is at: http://lxr.php.net/source/php4/main/SAPI.c#542 With a call such as header('HTTP/1.0 409'); the HTTP version is never even considered. The status code is the only thing that is examined and changed. And, in fact, I'm unsure why PHP/Apache would respond with a HTTP/1.1 header when given a HTTP/1.0 request. Telnetting to port 80 of my PHP/4.3.2RC2 server and issuing the following request: GET /test.php HTTP/1.0 Host: test.com will illicit a HTTP/1.1 response, even when test.php contains: header('HTTP/1.0 409'); or: header('101',TRUE,101); header('Upgrade: HTTP/1.0'); as noted as the way to "Switch" protocols in the RFC, albeit in this case, since the client is me doing a telnet and not a user agent, this would have little bearing. If someone could take another look at this I'd very much appreciate it. Hans ------------------------------------------------------------------------ [2003-05-13 01:42:09] helly@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php You need to "SWITCH" the protocol. ------------------------------------------------------------------------ [2003-05-12 18:58:41] hz11 at nyu dot edu I have a .php setup as an ErrorDocument under Apache 1.3.27, compiled as a DSO. When an request is made that isn't found, the page is called without issue. So, I'm trying to set a different header, for example: header('HTTP/1.0 408 Request Time-out',TRUE,408); However, the response header always ends up: HTTP/1.1 408 Request Time-out on the client. If I were to change the status code, everything works as expected, yet I can't override the HTTP version. Is this expected behavior; do I need to force changes like this in Apache's conf, or is it something that could use another look? Many thanks, Hans ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23602&edit=1

« previous php.bugs (#40038) next »