lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV no_proxy vs. ftp://userid:address@hidden/


From: Foteos Macrides
Subject: Re: LYNX-DEV no_proxy vs. ftp://userid:address@hidden/
Date: Mon, 04 Nov 1996 18:58:07 -0500 (EST)

address@hidden (Paul Gilmartin) wrote:
>I've stumbled on a peculiar behavior in Lynx 2.6; none of
>the published patches applied:
>
>With "host" in my no_proxy list, I try the URLs:
>
>    ftp://address@hidden/
>    ftp://userid:address@hidden/
>
>The first URL (correctly) bypasses the proxy; the second (incorrectly)
>uses the proxy.
>
>I've traced this, I believe, to code in HTAccess.c:
>
>    if (NULL != (p = strchr(host, ':'))) {      /* Port specified */
>        *p++ = 0;                               /* Chop off port */
>        port = atoi(p);
>    } else {                                    /* Use default port */
>
>which mistakes the colon separating the userid from the password
>for a colon separating the host from a port.
>
>(or perhaps it's that:
>
>    if (!(host = HTParse(addr, "", PARSE_HOST)))
>        return NO;
>
>returns "userid:password" as part of the host).

        The HTParse() function should return the complete "host" field
from the URL, as it's doing, with or without a lead "//" depending on
whether the "punctuation" is requested in the arguments for HTParse(),
and the calling function (in this case, override_proxy() in HTAccess.c)
should take into account any username, password, or port components
in that field.


>Would a better C coder than I volunteer to fix this?

        I put out a lynx2-6mods.zip on our servers with the mods I've
incorporated into our local code.  You can look at the override_proxy()
in that to see how I dealt with the problem here.  Note that this zip
is not a return from vacation, should not now or ever be treated as
"official", but simply makes the mods available to others in compliance
with the GNU General Public License.


>(There's a slight probability this is a result of private
>changes to HTFTP.c -- very slight, because http URLs seem
>to follow the same path, and I haven't done anything to HTTP.)

        It was bad logic in override_proxy().
        
                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]