--- src/http.c.orig	Mon May 30 09:29:01 2005
+++ src/http.c	Tue Jul  5 17:15:59 2005
@@ -1676,6 +1676,14 @@
 	      if (BEGINS_WITH (www_authenticate, "NTLM"))
 		ntlm_seen = 1;
 	      xfree (pth);
+
+              /* If using a proxy, then conn is currently a connection to the 
+                 host by way of the proxy, but retry_with_auth assumes conn
+                 has already been initialized with the proxy information, so
+                 reinitialize conn with proxy */
+              if (proxy)
+                conn = proxy;
+
 	      goto retry_with_auth;
 	    }
 	}
