]> granicus.if.org Git - apache/commitdiff
mod_negotiation: don't return non-AP_FILTER_ERROR filter return values
authorEric Covener <covener@apache.org>
Wed, 23 Nov 2011 03:36:22 +0000 (03:36 +0000)
committerEric Covener <covener@apache.org>
Wed, 23 Nov 2011 03:36:22 +0000 (03:36 +0000)
to ap_run_handler() when sending a body directly from a type-map.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1205274 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_negotiation.c

index fc13bcdc7865f633af9a68d447e2574620b7e705..f8668db593ef355269a0b7056c308c982907f712 100644 (file)
@@ -2972,6 +2972,7 @@ static int handle_map_file(request_rec *r)
     int res;
     char *udir;
     const char *new_req;
+    apr_status_t rv;
 
     if(strcmp(r->handler,MAP_FILE_MAGIC_TYPE) && strcmp(r->handler,"type-map"))
         return DECLINED;
@@ -3050,7 +3051,16 @@ static int handle_map_file(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);
+        rv = ap_pass_brigade(r->output_filters, bb);
+        if (rv != APR_SUCCESS) { 
+            if (rv != AP_FILTER_ERROR) {
+                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
+                              "ap_pass_brigade returned %d", rv);
+                return HTTP_INTERNAL_SERVER_ERROR;
+            }
+            return AP_FILTER_ERROR;
+        }
+        return OK;
     }
 
     if (r->path_info && *r->path_info) {