]> granicus.if.org Git - apache/commitdiff
mod_proxy: Add proxy-sendextracrlf option to send an extra CRLF at the
authorJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 14 Mar 2005 22:22:58 +0000 (22:22 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 14 Mar 2005 22:22:58 +0000 (22:22 +0000)
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
modules/proxy/mod_proxy_http.c

diff --git a/CHANGES b/CHANGES
index 7ef5afd99b7f2e03a37b8a9b4d61e80057bd34a7..8b6b46e86d55253ff90599bcb7e383870026e1e9 100644 (file)
--- 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]
index d4b50576c8b6509d2d81645a0dbe77d5e7d5604d..1d6636765241e1400e06b1d0e435bf2750850023 100644 (file)
@@ -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;
 }