]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Default handler: Don't return output filter apr_status_t values.
authorJeff Trawick <trawick@apache.org>
Mon, 10 Apr 2006 18:01:29 +0000 (18:01 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 10 Apr 2006 18:01:29 +0000 (18:01 +0000)
PR:          31759
Reviewed by: rpleum, gregames

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@393005 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/core.c

diff --git a/CHANGES b/CHANGES
index 065130f3cc45fc5f6ce52d4832ac229e1bdd0722..11c6ff67782590dbaa54247d3ddf695dd4d210be 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,9 @@ Changes with Apache 2.0.56
      ap_escape_html so we escape quotes.  Reported by JPCERT.
      [Mark Cox]
 
+  *) Default handler: Don't return output filter apr_status_t values.
+     PR 31759.  [Jeff Trawick, Ruediger Pluem, Joe Orton]
+
   *) mod_speling: Stop crashing with certain non-file requests.  
      [Jeff Trawick]
 
diff --git a/STATUS b/STATUS
index 796b9519a9ab18091fa2f253caae49c00e285189..b0bfee434a2ce971179f1a8dace1bf8f7527605e 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -116,14 +116,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
        http://svn.apache.org/viewcvs?rev=390573&view=rev
        +1: wrowe, trawick, rpluem
 
-    *) Default handler: Don't return output filter apr_status_t values. PR 31759.
-        Trunk version of patch:
-          http://svn.apache.org/viewcvs?rev=390922&view=rev
-          http://svn.apache.org/viewcvs?rev=391025&view=rev
-        2.0.x version of patch:
-          Trunk version works
-      +1: rpluem, trawick, gregames
-
     *) Make sure we write a reasonable status line (e.g., if byterange
        filter modifies status and custom status line is left
        unmodified).
index be59bcdfc5d2d48818d4a0247417fd7a561d38ec..9e2c2af30046900107e34a54e65d981e25c94d32 100644 (file)
@@ -3645,7 +3645,19 @@ static int default_handler(request_rec *r)
         e = apr_bucket_eos_create(c->bucket_alloc);
         APR_BRIGADE_INSERT_TAIL(bb, e);
 
-        return ap_pass_brigade(r->output_filters, bb);
+        status = ap_pass_brigade(r->output_filters, bb);
+        if (status == APR_SUCCESS
+            || r->status != HTTP_OK
+            || c->aborted) {
+            return OK; /* r->status will be respected */
+        }
+        else {
+            /* no way to know what type of error occurred */
+            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
+                          "default_handler: ap_pass_brigade returned %i",
+                          status);
+            return HTTP_INTERNAL_SERVER_ERROR;
+        }
     }
     else {              /* unusual method (not GET or POST) */
         if (r->method_number == M_INVALID) {