From 8bc56b5d297ad32a4c6c12b8ee5ea09858281ee7 Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Mon, 14 Mar 2005 22:22:58 +0000 Subject: [PATCH] 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 --- CHANGES | 4 ++++ modules/proxy/mod_proxy_http.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGES b/CHANGES index 7ef5afd99b..8b6b46e86d 100644 --- a/CHANGES +++ b/CHANGES @@ -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] diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index d4b50576c8..1d66367652 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -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; } -- 2.50.1