Commit 5e050a21 authored by Graham Leggett's avatar Graham Leggett
Browse files

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
parent 010d1227
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -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);