diff options
author | Doug MacEachern <dougm@apache.org> | 2002-03-30 07:19:14 +0100 |
---|---|---|
committer | Doug MacEachern <dougm@apache.org> | 2002-03-30 07:19:14 +0100 |
commit | 51ee9a749e2d583d3d6c0959951e7dfa9f096713 (patch) | |
tree | ae7fb6a959c8d850fce74034ee4c525ee8e0e5a3 /modules | |
parent | change sc->server references to myCtxConfig, so proxy can use the (diff) | |
download | apache2-51ee9a749e2d583d3d6c0959951e7dfa9f096713.tar.xz apache2-51ee9a749e2d583d3d6c0959951e7dfa9f096713.zip |
ap_proxy_http_request needs to check the return status of ap_pass_brigade
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94333 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/proxy/proxy_http.c | 21 |
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 |