httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r731388 - /httpd/httpd/trunk/modules/filters/mod_ext_filter.c
Date Sun, 04 Jan 2009 23:58:57 GMT
Author: niq
Date: Sun Jan  4 15:58:57 2009
New Revision: 731388

URL: http://svn.apache.org/viewvc?rev=731388&view=rev
Log:
Improved fix to PR#41120: send a clean error response when aborting

Modified:
    httpd/httpd/trunk/modules/filters/mod_ext_filter.c

Modified: httpd/httpd/trunk/modules/filters/mod_ext_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_ext_filter.c?rev=731388&r1=731387&r2=731388&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_ext_filter.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_ext_filter.c Sun Jan  4 15:58:57 2009
@@ -879,8 +879,18 @@
                 return ap_pass_brigade(f->next, bb);
             }
             else {
-                f->r->status = HTTP_INTERNAL_SERVER_ERROR;
-                return HTTP_INTERNAL_SERVER_ERROR;
+                apr_bucket *e;
+                f->r->status_line = "500 Internal Server Error";
+
+                apr_brigade_cleanup(bb);
+                e = ap_bucket_error_create(HTTP_INTERNAL_SERVER_ERROR,
+                                           NULL, r->pool,
+                                           f->c->bucket_alloc);
+                APR_BRIGADE_INSERT_TAIL(bb, e);
+                e = apr_bucket_eos_create(f->c->bucket_alloc);
+                APR_BRIGADE_INSERT_TAIL(bb, e);
+                ap_pass_brigade(f->next, bb);
+                return AP_FILTER_ERROR;
             }
         }
         ctx = f->ctx;



Mime
View raw message