From 0da7057591609d98f3e0820a13730d97abb2083a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 15 Sep 2000 06:10:52 +0000 Subject: more "anything through http proxy tunnel" fixes --- lib/http.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index 7d3507ce4..fba4b80cb 100644 --- a/lib/http.c +++ b/lib/http.c @@ -140,7 +140,8 @@ bool static checkheaders(struct UrlData *data, char *thisheader) * this proxy. After that, the socket can be used just as a normal socket. */ -CURLcode GetHTTPProxyTunnel(struct UrlData *data, int tunnelsocket) +CURLcode GetHTTPProxyTunnel(struct UrlData *data, int tunnelsocket, + char *hostname, int remote_port) { int httperror=0; int subversion=0; @@ -153,7 +154,7 @@ CURLcode GetHTTPProxyTunnel(struct UrlData *data, int tunnelsocket) "%s" "%s" "\r\n", - data->hostname, data->remote_port, + hostname, remote_port, (data->bits.proxy_user_passwd)?data->ptr_proxyuserpwd:"", (data->useragent?data->ptr_uagent:"") ); @@ -197,7 +198,8 @@ CURLcode http_connect(struct connectdata *conn) if (conn->protocol & PROT_HTTPS) { if (data->bits.httpproxy) { /* HTTPS through a proxy can only be done with a tunnel */ - result = GetHTTPProxyTunnel(data, data->firstsocket); + result = GetHTTPProxyTunnel(data, data->firstsocket, + data->hostname, data->remote_port); if(CURLE_OK != result) return result; } -- cgit v1.2.3