It's a bug caused by an oversight, thanks for the report. Please let
me know if this patch corrects the problem:
2004-03-30 Hrvoje Niksic [EMAIL PROTECTED]
* http.c (gethttp): Send the Proxy-Authorization header over
non-SSL connections too.
Index: src/http.c
===
RCS file: /pack/anoncvs/wget/src/http.c,v
retrieving revision 1.141
diff -u -r1.141 http.c
--- src/http.c 2004/02/25 23:45:24 1.141
+++ src/http.c 2004/03/30 09:36:53
@@ -1113,35 +1113,6 @@
conn = u;
- proxyauth = NULL;
- if (proxy)
-{
- char *proxy_user, *proxy_passwd;
- /* For normal username and password, URL components override
-command-line/wgetrc parameters. With proxy
-authentication, it's the reverse, because proxy URLs are
-normally the permanent ones, so command-line args
-should take precedence. */
- if (opt.proxy_user opt.proxy_passwd)
- {
- proxy_user = opt.proxy_user;
- proxy_passwd = opt.proxy_passwd;
- }
- else
- {
- proxy_user = proxy-user;
- proxy_passwd = proxy-passwd;
- }
- /* This does not appear right. Can't the proxy request,
-say, `Digest' authentication? */
- if (proxy_user proxy_passwd)
- proxyauth = basic_authentication_encode (proxy_user, proxy_passwd);
-
- /* If we're using a proxy, we will be connecting to the proxy
-server. */
- conn = proxy;
-}
-
/* Prepare the request to send. */
req = request_new ();
@@ -1203,6 +1174,41 @@
request_set_header (req, Authorization,
basic_authentication_encode (user, passwd),
rel_value);
+}
+
+ proxyauth = NULL;
+ if (proxy)
+{
+ char *proxy_user, *proxy_passwd;
+ /* For normal username and password, URL components override
+command-line/wgetrc parameters. With proxy
+authentication, it's the reverse, because proxy URLs are
+normally the permanent ones, so command-line args
+should take precedence. */
+ if (opt.proxy_user opt.proxy_passwd)
+ {
+ proxy_user = opt.proxy_user;
+ proxy_passwd = opt.proxy_passwd;
+ }
+ else
+ {
+ proxy_user = proxy-user;
+ proxy_passwd = proxy-passwd;
+ }
+ /* This does not appear right. Can't the proxy request,
+say, `Digest' authentication? */
+ if (proxy_user proxy_passwd)
+ proxyauth = basic_authentication_encode (proxy_user, proxy_passwd);
+
+ /* If we're using a proxy, we will be connecting to the proxy
+server. */
+ conn = proxy;
+
+ /* Proxy authorization over SSL is handled below. */
+#ifdef HAVE_SSL
+ if (u-scheme != SCHEME_SSL)
+#endif
+ request_set_header (req, Proxy-Authorization, proxyauth, rel_value);
}
{