Re: ftp thru proxy patch

At 12:17 PM 11/27/96 +1100, Herbert Xu wrote:
>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.

Sorry about that!

>	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.

Ah - I see! However, I would change this part which is the next block from
where your patch is applied. This is where the protocol module is deduced
form the URL. You can try something like this (which could be made more
elegant!)

    /* Find a protocol object for this access scheme */
    {
        char * proxy = HTRequest_proxy(request);
	 char * access = NULL;
	 if (!proxy) access = HTParse(physical, "", PARSE_ACCESS);
        if ((protocol = HTProtocol_find(request, proxy ? proxy : access))
== NULL) {
            if (CORE_TRACE) HTTrace("Net Object.. NO PROTOCOL OBJECT\n");
            HT_FREE(access);
            return NO;
        }
        HT_FREE(access);
    }

Please don't take it personal when and if I don't get around to answer
mails on this mailing list. I would like to but the mail burden is so high
that if I have to get anything done at all, I have to shut if off from time
to time.

Thanks for this and other patches!

Henrik

--
Henrik Frystyk Nielsen, <frystyk@w3.org>
World Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA

Received on Tuesday, 26 November 1996 22:34:05 UTC