]> granicus.if.org Git - apache/commitdiff
Merge r1634425 from trunk:
authorEric Covener <covener@apache.org>
Sat, 1 Nov 2014 17:58:49 +0000 (17:58 +0000)
committerEric Covener <covener@apache.org>
Sat, 1 Nov 2014 17:58:49 +0000 (17:58 +0000)
When using EBCDIC encoding, HTTPS through ProxyPass and ProxyRemote doesn't
work correctly. PR 57092

Submitted By: Edward Lu
Reviewed By: covener, jim, ylavic

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1636002 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index 4110e57ed5ab2e076dc9e21921ba4316bd5ed470..e0c5b3c1461347f480766accad9968f6d4209825 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.11
 
+  *) mod_proxy_connect: Fix ProxyRemote to https:// backends on EBCDIC 
+     systems. PR 57092 [Edward Lu <Chaosed0 gmail.com>]
+
   *) mod_cache: Avoid a 304 response to an unconditional requst when an AH00752
      CacheLock error occurs during cache revalidation. [Eric Covener]
  
index 3442a9003683b8655ce515da5acef004c2f0eaa0..e0fb69b42ae6f65937f5719251986d8d906553f3 100644 (file)
@@ -2494,6 +2494,7 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
     nbytes += apr_snprintf(buffer + nbytes, sizeof(buffer) - nbytes,
                            "Proxy-agent: %s" CRLF CRLF,
                            ap_get_server_banner());
+    ap_xlate_proto_to_ascii(buffer, nbytes);
     apr_socket_send(backend->sock, buffer, &nbytes);
 
     /* Receive the whole CONNECT response */
@@ -2505,7 +2506,8 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
         len += nbytes;
         left -= nbytes;
         buffer[len] = '\0';
-        if (strstr(buffer + len - nbytes, "\r\n\r\n") != NULL) {
+        if (strstr(buffer + len - nbytes, CRLF_ASCII CRLF_ASCII) != NULL) {
+            ap_xlate_proto_from_ascii(buffer, len);
             complete = 1;
             break;
         }
@@ -2517,7 +2519,7 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
             status = apr_socket_recv(backend->sock, drain_buffer, &nbytes);
             drain_buffer[nbytes] = '\0';
             nbytes = sizeof(drain_buffer) - 1;
-            if (strstr(drain_buffer, "\r\n\r\n") != NULL) {
+            if (strstr(drain_buffer, CRLF_ASCII CRLF_ASCII) != NULL) {
                 break;
             }
         }