]> granicus.if.org Git - apache/commitdiff
Stop the default_handler from trying to deal with HEAD requests. By doing
authorRyan Bloom <rbb@apache.org>
Tue, 14 Nov 2000 06:11:24 +0000 (06:11 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 14 Nov 2000 06:11:24 +0000 (06:11 +0000)
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

include/util_filter.h
modules/http/http_core.c

index 221bcf67a8d901f8b170c797c441c963bd6928f2..bc662a43c7dabce8cf26334f49ca1c3cfb1c3f5f 100644 (file)
@@ -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 
  * 
index d5552405c9c3d658bddd445ae2576b07340cf8ee..62539738bc0eb80d26f2f2b4e5f5cde38b8240c5 100644 (file)
@@ -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);
 }
 
 /*