From: Eric Covener Date: Mon, 27 Oct 2014 00:55:20 +0000 (+0000) Subject: When using EBCDIC encoding, HTTPS through ProxyPass and ProxyRemote doesn't X-Git-Tag: 2.5.0-alpha~3749 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3eddd534ce131d16af56ef20ef3237565b2c678d;p=apache When using EBCDIC encoding, HTTPS through ProxyPass and ProxyRemote doesn't work correctly. PR 57092 Submitted By: Edward Lu Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1634425 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 150dde4c07..5229e805f5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + + *) mod_proxy_connect: Fix ProxyRemote to https:// backends on EBCDIC + systems. PR 57092 [Edward Lu ] + *) mod_cache: Avoid a 304 response to an unconditional requst when an AH00752 CacheLock error occurs during cache revalidation. [Eric Covener] diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 2ffebf80d5..edc721af6d 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -2562,6 +2562,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 */ @@ -2573,7 +2574,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; } @@ -2585,7 +2587,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; } }