From: Zeev Suraski Date: Fri, 21 May 1999 23:25:46 +0000 (+0000) Subject: This should be centralized... X-Git-Tag: BEFORE_PHP4_APACHE_MODULE_CHANGE~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be8b9778e0a9103af7691005ae29cc1615e52c40;p=php This should be centralized... --- diff --git a/cgi_main.c b/cgi_main.c index fb053dc709..076c8fee5b 100644 --- a/cgi_main.c +++ b/cgi_main.c @@ -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); diff --git a/main/SAPI.c b/main/SAPI.c index 178e2b8d83..b3518736fd 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -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; + } }