From: Martin Kraemer Date: Mon, 30 Jul 2001 11:34:01 +0000 (+0000) Subject: EBCDIC: The proxy, when used in a proxy chain, "forgot" to X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=921a300bd5a7c1532ecea35916d7c4ad9a427481;p=thirdparty%2Fapache%2Fhttpd.git EBCDIC: The proxy, when used in a proxy chain, "forgot" to convert the "CONNECT host:port HTTP/1.0" request line to ASCII before contacting the next proxy, and was thus unusable for SSL proxying. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@89786 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index 48d2af06878..d1702c1bb90 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,10 @@ Changes with Apache 1.3.21 + *) EBCDIC: The proxy, when used in a proxy chain, "forgot" to + convert the "CONNECT host:port HTTP/1.0" request line to ASCII + before contacting the next proxy, and was thus unusable for + SSL proxying. [Martin Kraemer] + *) SECURITY: Make support/split-logfile use the default log file if "/" or "\" are present in the virtual host name. This prevents the possible use of specially crafted virtual host names in diff --git a/src/modules/proxy/proxy_connect.c b/src/modules/proxy/proxy_connect.c index 600e2e1469c..07f28923ad0 100644 --- a/src/modules/proxy/proxy_connect.c +++ b/src/modules/proxy/proxy_connect.c @@ -227,9 +227,18 @@ int ap_proxy_connect_handler(request_rec *r, cache_req *c, char *url, Explain0("Sending the CONNECT request to the remote proxy"); ap_snprintf(buffer, sizeof(buffer), "CONNECT %s HTTP/1.0" CRLF, r->uri); +#ifdef CHARSET_EBCDIC + /* We are writing to the pure socket, + * so we must convert our string to ASCII first + */ + ebcdic2ascii(buffer, buffer, strlen(buffer)); +#endif send(sock, buffer, strlen(buffer),0); ap_snprintf(buffer, sizeof(buffer), "Proxy-agent: %s" CRLF CRLF, ap_get_server_version()); +#ifdef CHARSET_EBCDIC + ebcdic2ascii(buffer, buffer, strlen(buffer)); +#endif send(sock, buffer, strlen(buffer),0); } else {