summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2001-10-09 15:15:55 +0000
committerSascha Schumann <sas@php.net>2001-10-09 15:15:55 +0000
commit49b44d537f51aa64268758e393f7a1d8b5efbafc (patch)
treeeffae273492364049a4c5ae8900ce84df90b93ba
parent06111162cff4ccf6eda43f00291eaa1902826b34 (diff)
downloadphp-git-49b44d537f51aa64268758e393f7a1d8b5efbafc.tar.gz
Make the information available whether we are using HTTP/1.1
-rw-r--r--sapi/thttpd/thttpd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c
index 9ccac35130..22d413d9cb 100644
--- a/sapi/thttpd/thttpd.c
+++ b/sapi/thttpd/thttpd.c
@@ -16,6 +16,7 @@
+----------------------------------------------------------------------+
*/
+/* $Id$ */
#include "php.h"
#include "SAPI.h"
@@ -178,6 +179,12 @@ static void sapi_thttpd_register_variables(zval *track_vars_array TSRMLS_DC)
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) {