mirror of
https://github.com/php/php-src.git
synced 2024-11-30 05:13:56 +08:00
Make the information available whether we are using HTTP/1.1
This commit is contained in:
parent
06111162cf
commit
49b44d537f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user