]> 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 17:56:14 +0000 (17:56 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 10 Apr 2006 17:56:14 +0000 (17:56 +0000)
PR:          31759
Reviewed by: rpleum, jim

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

CHANGES
STATUS
server/core.c

diff --git a/CHANGES b/CHANGES
index 5af4f648c219507a949805623b00b66ec18951d9..608fbaeba9a1a6dece08001689a2e2053346172d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.2
 
+  *) Default handler: Don't return output filter apr_status_t values.
+     PR 31759.  [Jeff Trawick, Ruediger Pluem, Joe Orton]
 
 Changes with Apache 2.2.1
 
diff --git a/STATUS b/STATUS
index e056f76adde48d8dbd8edfd8cca1c02b778edcce..4ccddc0a030cca65f2133e429541a75e8cfb9d28 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -91,14 +91,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
       -1 bnicholes - The authorization refactoring that was done is for 2.3 and above.
                      This can not be backported to 2.2.
 
-    * 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.2.x version of patch:
-          Trunk version works
-      +1: rpluem, trawick, jim
-
     * mod_proxy: Forward proxy requests created by mod_rewrite to the correct
                  backend server. PR 39253.
         Trunk version of patch:
index 8138d83f7abe7bf3078d5312602c90a6245bb657..502bc34ca37c12d68919df552323d20adf8d1b5c 100644 (file)
@@ -3698,7 +3698,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;
+        }
+        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) {