From deff917851616c34ec5c8bcdd5795f15b375e6aa Mon Sep 17 00:00:00 2001 From: Anthony Whitehead Date: Thu, 8 Jun 2000 11:56:36 +0000 Subject: [PATCH] Added more server variables to the HTTP_SERVER_VARS array, all the variables listed in the structs in nsapi.c should work now. Untested on Windows platform. --- sapi/nsapi/nsapi.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index 799656bf90..8f911f1883 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -277,6 +277,27 @@ sapi_nsapi_register_server_variables(zval *track_vars_array ELS_DC SLS_DC PLS_DC } php_register_variable( (char *)nsapi_reqpb[i].env_var, value, track_vars_array ELS_CC PLS_CC ); } + + for (i = 0; i < nsapi_headers_size; i++) { + if ((value = pblock_findval(nsapi_headers[i].nsapi_eq, rc->rq->headers)) == NULL) { + value = buf; + } + php_register_variable( (char *)nsapi_headers[i].env_var, value, track_vars_array ELS_CC PLS_CC ); + } + + for (i = 0; i < nsapi_vars_size; i++) { + if ((value = pblock_findval(nsapi_vars[i].nsapi_eq, rc->rq->vars)) == NULL) { + value = buf; + } + php_register_variable( (char *)nsapi_vars[i].env_var, value, track_vars_array ELS_CC PLS_CC ); + } + + for (i = 0; i < nsapi_client_size; i++) { + if ((value = pblock_findval(nsapi_client[i].nsapi_eq, rc->sn->client)) == NULL) { + value = buf; + } + php_register_variable( (char *)nsapi_client[i].env_var, value, track_vars_array ELS_CC PLS_CC ); + } /* * Special PHP_SELF variable. -- 2.50.1