Commit 90c80908 authored by Justin Erenkrantz's avatar Justin Erenkrantz
Browse files

mod_proxy: Add proxy-sendextracrlf option to send an extra CRLF at the

end of the request body to work with really old HTTP servers.

* modules/proxy/mod_proxy_http.c
  (stream_reqbody_cl, spool_reqbody_cl): If proxy-sendextracrlf option is
  present, append a CRLF to the body stream that isn't counted against CL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157478 13f79535-47bb-0310-9956-ffa450edef68
parent 52964011
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2,6 +2,10 @@ Changes with Apache 2.1.4
  [Remove entries to the current 2.0 section below, when backported]
  *) mod_proxy: Add proxy-sendextracrlf option to send an extra CRLF at the
     end of the request body to work with really old HTTP servers.
     [Justin Erenkrantz]
  *) util_ldap: Keep track of the number of attributes retrieved from 
     LDAP so that all the values can be properly cached even if the 
     value is NULL. PR 33901 [Brad Nicholes]
+11 −0
Original line number Diff line number Diff line
@@ -373,6 +373,12 @@ static apr_status_t stream_reqbody_cl(apr_pool_t *p,
        /* need to flush any pending data */
        b = input_brigade; /* empty now; pass_brigade() will add flush */
    }
    if (apr_table_get(r->subprocess_env, "proxy-sendextracrlf")) {
        e = apr_bucket_immortal_create(ASCII_CRLF, 2,
                                       r->connection->bucket_alloc);
        APR_BRIGADE_INSERT_TAIL(input_brigade, e);
    }

    status = pass_brigade(bucket_alloc, r, conn, origin, b, 1);
    return status;
}
@@ -510,6 +516,11 @@ static apr_status_t spool_reqbody_cl(apr_pool_t *p,
        }
        APR_BRIGADE_INSERT_TAIL(header_brigade, e);
    }
    if (apr_table_get(r->subprocess_env, "proxy-sendextracrlf")) {
        e = apr_bucket_immortal_create(ASCII_CRLF, 2,
                                       r->connection->bucket_alloc);
        APR_BRIGADE_INSERT_TAIL(header_brigade, e);
    }
    status = pass_brigade(bucket_alloc, r, conn, origin, header_brigade, 1);
    return status;
}