You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ni...@apache.org on 2009/01/05 00:58:57 UTC
svn commit: r731388 - /httpd/httpd/trunk/modules/filters/mod_ext_filter.c
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;