Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 1997 22:28:09 -0700 (MST)
From:      Marc Slemko <marcs@znep.com>
To:        ports@FreeBSD.ORG
Subject:   Re: Port problem.
Message-ID:  <Pine.BSF.3.95.971027222436.13163A-100000@alive.znep.com>
In-Reply-To: <Pine.BSF.3.95.971027212626.11831A-100000@alive.znep.com>

next in thread | previous in thread | raw e-mail | index | archive | help
...and this change does, of course, violate RFC-1738 (RFC for URLs).
However, not making this change violates RFC-959 (RFC for ftp). 

Sigh.  What's a poor programmer to do.

On Mon, 27 Oct 1997, Marc Slemko wrote:

> It is arguable if the double // is valid to have there or not
> and what Apache should be doing with it; there are a zillion specs
> covering this and they all interact, so finding an exact answer
> would be difficult.
> 
> What Apache is doing is sending a "CWD " for the empty component
> of the path.  That is arguable incorrect, or at least not as good
> as it could be.
> 
> Below is a patch to Apache fix it.  Likely won't apply directly to 1.2,
> but you get the idea.  I will see if people agree that it should go into
> the 1.3 tree and, if so, I will commit it. 
> 
> This can, of course, be fixed by not having the double // there in the
> first place, but thats another matter.  It is also, of course, not a
> solution if you can't play with the proxy. 
> 
> Index: modules/proxy/proxy_ftp.c
> ===================================================================
> RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_ftp.c,v
> retrieving revision 1.40
> diff -u -r1.40 proxy_ftp.c
> --- proxy_ftp.c	1997/09/30 21:02:14	1.40
> +++ proxy_ftp.c	1997/10/28 04:20:40
> @@ -626,6 +629,10 @@
>  	*strp = '\0';
>  
>  	len = decodeenc(path);
> +	if (len == 0) {
> +	    path = strp + 1;
> +	    break;
> +	}
>  	bputs("CWD ", f);
>  	bwrite(f, path, len);
>  	bputs("\015\012", f);
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.971027222436.13163A-100000>