]> granicus.if.org Git - php/commitdiff
This should be centralized...
authorZeev Suraski <zeev@php.net>
Fri, 21 May 1999 23:25:46 +0000 (23:25 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 21 May 1999 23:25:46 +0000 (23:25 +0000)
cgi_main.c
main/SAPI.c

index fb053dc709fe4e8c632b770aa6805c6619943c53..076c8fee5bbbd1aa73107a7318ba98428a6310b5 100644 (file)
@@ -163,11 +163,6 @@ static void init_request_info(SLS_D)
        SG(request_info).query_string = getenv("QUERY_STRING");
        SG(request_info).request_uri = getenv("PATH_INFO");
        SG(request_info).path_translated = NULL; /* we have to update it later, when we have that information */
-       if (SG(request_info).request_method && !strcmp(SG(request_info).request_method, "HEAD")) {
-               SG(request_info).headers_only = 1;
-       } else {
-               SG(request_info).headers_only = 0;
-       }
        SG(request_info).content_type = getenv("CONTENT_TYPE");
        SG(request_info).content_length = (content_length?atoi(content_length):0);
 
index 178e2b8d831d1f167740ba714c6403db4f34aafa..b3518736fdb80ad3b34203c88ad1ca7b28c61b37 100644 (file)
@@ -102,6 +102,11 @@ SAPI_API void sapi_activate(SLS_D)
                }
                SG(request_info).cookie_data = sapi_module.read_cookies(SLS_C);
        }
+       if (SG(request_info).request_method && !strcmp(SG(request_info).request_method, "HEAD")) {
+               SG(request_info).headers_only = 1;
+       } else {
+               SG(request_info).headers_only = 0;
+       }
 }