Re: [squid-users] FTP-gateway through SQUID

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 21 Nov 2001 19:57:20 +0100

On Wednesday 21 November 2001 14.44, Zebbe . wrote:

> That doesnot work either.. Eventually this link is filled with
> %2f-encoding. In the RFC i could read some about this but I didn't quite
> get it.. Can someone help me?

The %2f thing is about the relatively large amount of incorrect FTP URL's
out there uses the absolute path on the server rather than relative to the
starting directory. This problem is mainly caused by Netscape not
implementing RFC1738 for FTP when not using a proxy. By adding a %2f on the
first component in the URL you encode a explicit / character, making the URL
path absolute on at least UNIX servers.

These problems are most commonly seen with non-anonymous FTP as non-anonymous
FTP usually starts in the users home directory for user convenience.

For anonymous FTP the starting directory is usually the root directory,
completely eleminating the issue, but there is a few anonymous FTP servers
where the starting directory is /pub/ or the equivalence so the problem may
be evident for some anonymous FTP URL's as well.

Lets take a simple example: A user wishes to retreive a file from his home
directory on a UNIX FTP server:

Correct URL:
ftp://username:password@server/filename

Netscapes idea:
ftp://username:password@server/whatever/path/to/home/filename
forcing the user to know the exact path to his home directory on the server,
even if FTP defaults to start there...

I have no idea how Netscape deals with non-UNIX servers NOT using / as
directory separator or "root" directory, if they at all deal with such
servers...

Squid has a couple of built in hacks trying to work around these bad
URL's while defaulting to follow RFC1738 conventions. If the request looks
like a request for a file then Squid will as a last resort try the file with
the absolute UNIX path, and as you saw, when all else fails the error message
gives you a link with a encoded / you can try for directories..

Regards
Henrik Nordstrom

-- 
MARA Systems AB
Giving you basic free Squid support
Priority support or Squid enhancements available on request
Received on Wed Nov 21 2001 - 11:56:52 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:04:24 MST