]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
EBCDIC: The proxy, when used in a proxy chain, "forgot" to
authorMartin Kraemer <martin@apache.org>
Mon, 30 Jul 2001 11:34:01 +0000 (11:34 +0000)
committerMartin Kraemer <martin@apache.org>
Mon, 30 Jul 2001 11:34:01 +0000 (11:34 +0000)
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

src/CHANGES
src/modules/proxy/proxy_connect.c

index 48d2af068785c22432920c4ca648cc0b4b603487..d1702c1bb90877a9845f4e9dcc328b50a63f7a33 100644 (file)
@@ -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
index 600e2e1469c5b39e835b67279e7015598f55c8d5..07f28923ad0b40dd1cb19d1253895f536ea18276 100644 (file)
@@ -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 {