summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/proxy/proxy_http.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c
index de9f8acf62..75a8d613af 100644
--- a/modules/proxy/proxy_http.c
+++ b/modules/proxy/proxy_http.c
@@ -423,6 +423,8 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
const apr_array_header_t *headers_in_array;
const apr_table_entry_t *headers_in;
int counter;
+ apr_status_t status;
+
/*
* Send the HTTP/1.1 request to the remote server
*/
@@ -598,7 +600,14 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
e = apr_bucket_flush_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, e);
- ap_pass_brigade(origin->output_filters, bb);
+ status = ap_pass_brigade(origin->output_filters, bb);
+
+ if (status != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
+ "proxy: request failed to %pI (%s)",
+ p_conn->addr, p_conn->name);
+ return status;
+ }
/* send the request data, if any. */
if (ap_should_client_block(r)) {
@@ -607,11 +616,17 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
APR_BRIGADE_INSERT_TAIL(bb, e);
e = apr_bucket_flush_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, e);
- ap_pass_brigade(origin->output_filters, bb);
+ status = ap_pass_brigade(origin->output_filters, bb);
+ if (status != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
+ "proxy: pass request data failed to %pI (%s)",
+ p_conn->addr, p_conn->name);
+ return status;
+ }
apr_brigade_cleanup(bb);
}
}
- return OK;
+ return APR_SUCCESS;
}
static