From: Graham Leggett Date: Mon, 2 Apr 2001 20:55:23 +0000 (+0000) Subject: Fixed problem where responses without entity bodies would cause X-Git-Tag: 2.0.16~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0628baf0272c8a0a35e4a52ae424774c4c6f3565;p=thirdparty%2Fapache%2Fhttpd.git Fixed problem where responses without entity bodies would cause the directly following proxy keepalive request to fail. PR: Obtained from: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88657 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index b37923d034b..8b79bc37917 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -322,7 +322,10 @@ int ap_proxy_http_handler(request_rec *r, char *url, /* use previous keepalive socket */ origin = conf->origin; sock = origin->client_socket; + origin->aborted = 0; + origin->keepalive = 1; origin->keepalives++; + origin->remain = 0; new = 0; /* XXX FIXME: If the socket has since closed, change new to 1 so @@ -388,11 +391,6 @@ int ap_proxy_http_handler(request_rec *r, char *url, origin->keepalive = 1; origin->keepalives = 1; - /* set up the connection filters */ - ap_add_output_filter("CORE", NULL, NULL, origin); - ap_add_input_filter("HTTP_IN", NULL, NULL, origin); - ap_add_input_filter("CORE_IN", NULL, NULL, origin); - /* if we get here, all is well */ failed = 0; break; @@ -416,6 +414,15 @@ int ap_proxy_http_handler(request_rec *r, char *url, * Send the HTTP/1.1 request to the remote server */ + /* set up the connection filters */ + origin->input_filters = NULL; + ap_add_input_filter("HTTP_IN", NULL, NULL, origin); + ap_add_input_filter("CORE_IN", NULL, NULL, origin); + + origin->output_filters = NULL; + ap_add_output_filter("CORE", NULL, NULL, origin); + + /* strip connection listed hop-by-hop headers from the request */ /* even though in theory a connection: close coming from the client * should not affect the connection to the server, it's unlikely @@ -572,6 +579,7 @@ int ap_proxy_http_handler(request_rec *r, char *url, * filter chain */ + rp = make_fake_req(origin, r); apr_brigade_destroy(bb);