cvs: php4 /sapi/thttpd thttpd.c
| From: | Sascha Schumann | Date: | Tue, 09 Oct 2001 15:15:57 +0000 |
| Subject: | cvs: php4 /sapi/thttpd thttpd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-7734@lists.php.net to get a copy of this message | ||
sas Tue Oct 9 11:15:57 2001 EDT
Modified files:
/php4/sapi/thttpd thttpd.c
Log:
Make the information available whether we are using HTTP/1.1
Index: php4/sapi/thttpd/thttpd.c
diff -u php4/sapi/thttpd/thttpd.c:1.58 php4/sapi/thttpd/thttpd.c:1.59
--- php4/sapi/thttpd/thttpd.c:1.58 Sun Sep 30 14:23:28 2001
+++ php4/sapi/thttpd/thttpd.c Tue Oct 9 11:15:55 2001
@@ -16,6 +16,7 @@
+----------------------------------------------------------------------+
*/
+/* $Id: thttpd.c,v 1.59 2001/10/09 15:15:55 sas Exp $ */
#include "php.h"
#include "SAPI.h"
@@ -178,6 +179,12 @@
php_register_variable("REQUEST_URI", SG(request_info).request_uri, track_vars_array
TSRMLS_CC);
php_register_variable("PATH_TRANSLATED", SG(request_info).path_translated,
track_vars_array TSRMLS_CC);
+ if (TG(hc)->one_one) {
+ php_register_variable("SERVER_PROTOCOL", "HTTP/1.1", track_vars_array
TSRMLS_CC);
+ } else {
+ php_register_variable("SERVER_PROTOCOL", "HTTP/1.0", track_vars_array
TSRMLS_CC);
+ }
+
p = inet_ntoa(TG(hc)->client_addr.sa_in.sin_addr);
/* string representation of IPs are never larger than 512 bytes */
if (p) {