mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Don't include the Proxy-Authorization header in the request tunneled
through proxy.
This commit is contained in:
parent
3eef068815
commit
83b0e38940
@ -1,3 +1,8 @@
|
|||||||
|
2003-11-28 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* http.c (gethttp): Don't include the Proxy-Authorization header
|
||||||
|
in the request tunneled through proxy.
|
||||||
|
|
||||||
2003-11-28 Hrvoje Niksic <hniksic@xemacs.org>
|
2003-11-28 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* http.c (gethttp): Use the CONNECT handle to establish SSL
|
* http.c (gethttp): Use the CONNECT handle to establish SSL
|
||||||
|
@ -916,11 +916,15 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
|||||||
+ (proxyauth ? strlen (proxyauth) : 0));
|
+ (proxyauth ? strlen (proxyauth) : 0));
|
||||||
sprintf (connect, "CONNECT %s:%d HTTP/1.0\r\n%s\r\n",
|
sprintf (connect, "CONNECT %s:%d HTTP/1.0\r\n%s\r\n",
|
||||||
u->host, u->port, proxyauth ? proxyauth : "");
|
u->host, u->port, proxyauth ? proxyauth : "");
|
||||||
|
/* Now that PROXYAUTH is part of the CONNECT request, zero
|
||||||
|
it out so we don't send proxy authorization with the
|
||||||
|
regular request below. */
|
||||||
|
proxyauth = NULL;
|
||||||
|
|
||||||
DEBUGP (("Writing to proxy: [%s]\n", connect));
|
DEBUGP (("Writing to proxy: [%s]\n", connect));
|
||||||
write_error = fd_write (sock, connect, strlen (connect), -1);
|
write_error = fd_write (sock, connect, strlen (connect), -1);
|
||||||
if (write_error < 0)
|
if (write_error < 0)
|
||||||
{
|
{
|
||||||
xfree_null (proxyauth);
|
|
||||||
logprintf (LOG_VERBOSE, _("Failed writing to proxy: %s.\n"),
|
logprintf (LOG_VERBOSE, _("Failed writing to proxy: %s.\n"),
|
||||||
strerror (errno));
|
strerror (errno));
|
||||||
CLOSE_INVALIDATE (sock);
|
CLOSE_INVALIDATE (sock);
|
||||||
@ -930,7 +934,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
|||||||
head = fd_read_http_head (sock);
|
head = fd_read_http_head (sock);
|
||||||
if (!head)
|
if (!head)
|
||||||
{
|
{
|
||||||
xfree_null (proxyauth);
|
|
||||||
logprintf (LOG_VERBOSE, _("Failed reading proxy response: %s\n"),
|
logprintf (LOG_VERBOSE, _("Failed reading proxy response: %s\n"),
|
||||||
strerror (errno));
|
strerror (errno));
|
||||||
CLOSE_INVALIDATE (sock);
|
CLOSE_INVALIDATE (sock);
|
||||||
@ -950,7 +953,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
|||||||
if (statcode != 200)
|
if (statcode != 200)
|
||||||
{
|
{
|
||||||
failed_tunnel:
|
failed_tunnel:
|
||||||
xfree_null (proxyauth);
|
|
||||||
logprintf (LOG_NOTQUIET, _("Proxy tunneling failed: %s"),
|
logprintf (LOG_NOTQUIET, _("Proxy tunneling failed: %s"),
|
||||||
message ? message : "?");
|
message ? message : "?");
|
||||||
xfree_null (message);
|
xfree_null (message);
|
||||||
|
Loading…
Reference in New Issue
Block a user