[Prev][Next][Index][Thread]

ftp thru proxy patch



Hello:
	I reported a problem about FTPing thru proxies
with ComLine, LineMode, etc. several weeks ago and received
no replies.  I was able to get it work by applying the
appended patch.

	The problem was that libwww got the proxy address,
but deduced the protocol from the physical address, which
comes out to be ftp.  Thus it tried to connect to the
proxy server (Squid) with ftp, which promptly failed.

	I would like to get some feedback on whether this
patch is the correct fix for 5.0a.
-- 
Debian GNU/Linux 1.1 is out! { http://www.debian.org/ }
Email:  Herbert Xu ~{PmV>HI~} <herbert@greathan.apana.org.au>
{ http://greathan.apana.org.au/~herbert/ }
PGP Key:  pgp-public-keys@pgp.mit.edu or any other key sites
--
--- HTNet.c.orig	Fri Oct 11 08:45:44 1996
+++ HTNet.c	Wed Nov 27 11:56:32 1996
@@ -631,7 +631,8 @@
     ** If no translation was provided by the filters then use the anchor
     ** address directly
     */
-    if (!(physical = HTAnchor_physical(anchor))) {
+    if (!(physical = HTRequest_proxy(request)) &&
+        !(physical = HTAnchor_physical(anchor))) {
 	char * addr = HTAnchor_address((HTAnchor *) anchor);
 	if (CORE_TRACE) HTTrace("Net Object.. Using default address\n");
 	HTAnchor_setPhysical(anchor, addr);