From: Ryan Bloom Date: Tue, 14 Nov 2000 06:11:24 +0000 (+0000) Subject: Stop the default_handler from trying to deal with HEAD requests. By doing X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29411fb9ed67e8e41ad7b238d935c749f0aff30d;p=apache Stop the default_handler from trying to deal with HEAD requests. By doing this, the content-length filter can determine the C-L before we send the response, and we get a better response. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86955 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/util_filter.h b/include/util_filter.h index 221bcf67a8..bc662a43c7 100644 --- a/include/util_filter.h +++ b/include/util_filter.h @@ -73,6 +73,7 @@ extern "C" { #define AP_NOBODY_WROTE -1 #define AP_NOBODY_READ -2 +#define AP_REQUEST_DONE -3 /* ap_input_mode_t - input filtering modes * diff --git a/modules/http/http_core.c b/modules/http/http_core.c index d5552405c9..62539738bc 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2875,6 +2875,8 @@ static int do_nothing(request_rec *r) { return OK; } static int default_handler(request_rec *r) { + ap_bucket_brigade *bb; + ap_bucket *e; core_dir_config *d = (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); int errstatus; @@ -2939,18 +2941,14 @@ static int default_handler(request_rec *r) ap_md5digest(r->pool, fd)); } - if (!r->header_only) { - ap_bucket_brigade *bb = ap_brigade_create(r->pool); - ap_bucket *e = ap_bucket_create_file(fd, 0, r->finfo.size); - - AP_BRIGADE_INSERT_HEAD(bb, e); - e = ap_bucket_create_eos(); - AP_BRIGADE_INSERT_TAIL(bb, e); + bb = ap_brigade_create(r->pool); + e = ap_bucket_create_file(fd, 0, r->finfo.size); - ap_pass_brigade(r->output_filters, bb); - } + AP_BRIGADE_INSERT_HEAD(bb, e); + e = ap_bucket_create_eos(); + AP_BRIGADE_INSERT_TAIL(bb, e); - return OK; + return ap_pass_brigade(r->output_filters, bb); } /*