From: William A. Rowe Jr Date: Wed, 11 Aug 2004 22:45:08 +0000 (+0000) Subject: Always use the cleanup. Do not close the socket directly. X-Git-Tag: post_ajp_proxy~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d65c9af1d8108f784b49a74db7db6817b27944bc;p=apache Always use the cleanup. Do not close the socket directly. Submitted by: mturk git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104603 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 13caec90ad..9a2063cf15 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -795,9 +795,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, len = ap_getline(buffer, sizeof(buffer), rp, 0); } if (len <= 0) { - apr_socket_close(backend->sock); - backend->sock = NULL; -// backend->connection = NULL; + ap_proxy_http_cleanup(NULL, r, backend); ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "proxy: error reading status line from remote " "server %s", backend->hostname); @@ -819,9 +817,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, * if the status line was > 8192 bytes */ else if ((buffer[5] != '1') || (len >= sizeof(buffer)-1)) { - apr_socket_close(backend->sock); -// backend->connection = NULL; - backend->sock = NULL; + ap_proxy_http_cleanup(NULL, r, backend); return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(p, "Corrupt status line returned by remote " "server: ", buffer, NULL));