]> granicus.if.org Git - apache/commitdiff
Proxy was bombing out every second keepalive request, caused by a
authorGraham Leggett <minfrin@apache.org>
Tue, 9 Apr 2002 09:39:04 +0000 (09:39 +0000)
committerGraham Leggett <minfrin@apache.org>
Tue, 9 Apr 2002 09:39:04 +0000 (09:39 +0000)
stray CRLF before the second response's status line. Proxy now
tries to read one more line if it encounters a CRLF where it
expected a status.
PR: 10010
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94574 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/proxy_http.c

diff --git a/CHANGES b/CHANGES
index b92c4f0346a91b18df51497b38b407466d4bf4d6..94c91b2d9d9d51ab6272da6237f613bf8d62d305 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Changes with Apache 2.0.36
 
+  *) Proxy was bombing out every second keepalive request, caused by a
+     stray CRLF before the second response's status line. Proxy now
+     tries to read one more line if it encounters a CRLF where it
+     expected a status. PR 10010 [Graham Leggett]
+
   *) Deprecated the apr_lock.h API. Please see the following files
      for the improved thread and process locking and signaling: 
      apr_proc_mutex.h, apr_thread_mutex.h, apr_thread_rwlock.h,
index eff26563b4e31cd2fdfe5e21f319e03cca7c034b..d7392d35ccfeb41d15ae725a019ed78659be2a3e 100644 (file)
@@ -661,6 +661,10 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
         apr_brigade_cleanup(bb);
 
         len = ap_getline(buffer, sizeof(buffer), rp, 0);
+        if (len == 0) {
+            /* handle one potential stray CRLF */
+            len = ap_getline(buffer, sizeof(buffer), rp, 0);
+        }
         if (len <= 0) {
             apr_socket_close(p_conn->sock);
             backend->connection = NULL;