]> granicus.if.org Git - php/commitdiff
Added more server variables to the HTTP_SERVER_VARS array, all the
authorAnthony Whitehead <antw@php.net>
Thu, 8 Jun 2000 11:56:36 +0000 (11:56 +0000)
committerAnthony Whitehead <antw@php.net>
Thu, 8 Jun 2000 11:56:36 +0000 (11:56 +0000)
variables listed in the structs in nsapi.c should work now. Untested on
Windows platform.

sapi/nsapi/nsapi.c

index 799656bf908cb825f2d823f6879e0a12f81434e5..8f911f18831d1502bf77e4150f8417fa906b7aa5 100644 (file)
@@ -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.