diff options
| author | Zeev Suraski <zeev@php.net> | 2000-09-08 14:43:57 +0000 |
|---|---|---|
| committer | Zeev Suraski <zeev@php.net> | 2000-09-08 14:43:57 +0000 |
| commit | 91c808ecc421ddaea9b0ae7f842daa727cfbf575 (patch) | |
| tree | b7fa79691812e958c99a413dac3d46319ab17d5a /sapi/apache | |
| parent | d10336ec0e00baed0e5157db45d9eb597065bb47 (diff) | |
| download | php-git-91c808ecc421ddaea9b0ae7f842daa727cfbf575.tar.gz | |
Restore the headers_only test to the centralized SAPI startup. If necessary, it can
be overriden in the activate() callback.
Diffstat (limited to 'sapi/apache')
| -rw-r--r-- | sapi/apache/mod_php4.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 9999e0fdaa..0d2fbecc7a 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -305,6 +305,11 @@ static int php_apache_sapi_activate(SLS_D) block_alarms(); register_cleanup(((request_rec *) SG(server_context))->pool, NULL, php_apache_request_shutdown, php_request_shutdown_for_exec); unblock_alarms(); + + /* Override the default headers_only value - sometimes "GET" requests should actually only + * send headers. + */ + SG(request_info).headers_only = r->header_only; return SUCCESS; } @@ -379,7 +384,6 @@ static void init_request_info(SLS_D) SG(request_info).request_method = (char *)r->method; SG(request_info).content_type = (char *) table_get(r->subprocess_env, "CONTENT_TYPE"); SG(request_info).content_length = (content_length ? atoi(content_length) : 0); - SG(request_info).headers_only = r->header_only; SG(sapi_headers).http_response_code = r->status; if (r->headers_in) { |
