You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2022/04/04 15:48:06 UTC
svn commit: r1899562 - /httpd/httpd/trunk/modules/http/http_filters.c
Author: rpluem
Date: Mon Apr 4 15:48:06 2022
New Revision: 1899562
URL: http://svn.apache.org/viewvc?rev=1899562&view=rev
Log:
* We need to set r->status on each call after we noticed an EOC as
data bucket generators like ap_die might have changed the status
code. But we know better in this case and insist on the status
code that we have seen in the error bucket.
Modified:
httpd/httpd/trunk/modules/http/http_filters.c
Modified: httpd/httpd/trunk/modules/http/http_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_filters.c?rev=1899562&r1=1899561&r2=1899562&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_filters.c (original)
+++ httpd/httpd/trunk/modules/http/http_filters.c Mon Apr 4 15:48:06 2022
@@ -1943,13 +1943,6 @@ apr_status_t ap_http_outerror_filter(ap_
if (AP_BUCKET_IS_EOC(e)) {
r->connection->keepalive = AP_CONN_CLOSE;
ctx->seen_eoc = 1;
- /* Set the request status to the status of the first error bucket.
- * This should ensure that we log an appropriate status code in
- * the access log.
- */
- if (ctx->first_error) {
- r->status = ctx->first_error;
- }
}
}
/*
@@ -1972,6 +1965,18 @@ apr_status_t ap_http_outerror_filter(ap_
* EOS bucket.
*/
if (ctx->seen_eoc) {
+ /*
+ * Set the request status to the status of the first error bucket.
+ * This should ensure that we log an appropriate status code in
+ * the access log.
+ * We need to set r->status on each call after we noticed an EOC as
+ * data bucket generators like ap_die might have changed the status
+ * code. But we know better in this case and insist on the status
+ * code that we have seen in the error bucket.
+ */
+ if (ctx->first_error) {
+ r->status = ctx->first_error;
+ }
e = APR_BRIGADE_FIRST(b);
while (e != APR_BRIGADE_SENTINEL(b)) {
apr_bucket *c = e;