diff options
Diffstat (limited to 'sapi/phttpd/phttpd.c')
| -rw-r--r-- | sapi/phttpd/phttpd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sapi/phttpd/phttpd.c b/sapi/phttpd/phttpd.c index 9f2eda9c16..72d81f401a 100644 --- a/sapi/phttpd/phttpd.c +++ b/sapi/phttpd/phttpd.c @@ -202,6 +202,12 @@ php_phttpd_request_ctor(PHLS_D SLS_DC) SG(request_info).query_string = PHG(cip)->hip->request; SG(request_info).request_method = PHG(cip)->hip->method; SG(request_info).path_translated = malloc(MAXPATHLEN+1); + SG(sapi_headers).http_response_code = 200; + if (!strcmp(PHG(cip)->hip->method, "HEAD")) { + SG(request_info).headers_only = 1; + } else { + SG(request_info).headers_only = 0; + } if (url_expand(PHG(cip)->hip->url, SG(request_info).path_translated, MAXPATHLEN, &PHG(sb), NULL, NULL) == NULL) { /* handle error */ } |
