Commit b4d18a74 authored by Graham Leggett's avatar Graham Leggett
Browse files

Stopped the HTTP proxy from trying to read entity bodies when there

wasn't one (response was 1xx, 204, 205 or 304).
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88928 13f79535-47bb-0310-9956-ffa450edef68
parent ac398777
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -741,8 +741,13 @@ PROXY_DECLARE (int) ap_proxy_http_handler(request_rec *r, proxy_server_conf *con
        APR_BRIGADE_INSERT_TAIL(bb, e);
    }

    /* send body */
    if (!r->header_only) {
    /* send body - but only if a body is expected */
    if ((!r->header_only) &&			/* not HEAD request */
        (r->status > 199) &&			/* not any 1xx response */
        (r->status != HTTP_NO_CONTENT) &&	/* not 204 */
        (r->status != HTTP_RESET_CONTENT) &&	/* not 205 */
        (r->status != HTTP_NOT_MODIFIED)) {	/* not 304 */

	const char *buf;
	apr_size_t readbytes;