lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev lynx and proxy. URI question


From: Heather Stern
Subject: Re: lynx-dev lynx and proxy. URI question
Date: Wed, 14 Jul 1999 09:59:26 -0700 (PDT)

James Kilfiger wrote:
> Hi
> I am using lynx with my university's web cache. 
> This is located at http://wwwcache.warwick.ac.uk:3128/
> 
> I incorrectly set the http_proxy enviroment variable to
>  http://wwwcache.warwick.ac.uk:3128
> (without the trailing slash)
> 
> When I tried to follow any link with this setting, it seemed that lynx
> would strip the `http:/' from the front of the link and then complain
> that (say) `/www...' was an ill formed URL.  This seems like odd
> behaviour.  Can anyone explain why the slash is required, and why
> dropping it causes this problem

Um, strictly speaking, 
http://www.domain.com:80/foo
        is probably a script living in the document root of domain.com
http://www.domain.com:80/foo/
        is a directory named foo immediately located in the document root
http://www.domain.com:80/foo.html

That's theory -- in reality: people type the first when meaning the second;
some web servers would serve 2 if 1 didn't exist; the popular web server
apache uses aliases for 2, so the resulting directory could really be 
anywhere (on the server side);  it's gotten common to see URIs that look 
like any of the three, but really denote a CGI call and its parameters; 
.html, .gif and other common extensions are a human affectation, the server 
could fail to bother with extensions entirely and use other means to decide 
what MIME types to declare; and port 80 is the default, so almost nobody 
actually says it.

In the case of the port number for the proxy, it's clear you're declaring
the document root and nothing further;  so 1 cannot really be the case,
and the URI needs a / on the end.

I don't remember the exact phrasing, but a URI (when correctly formed)
is the -precise- directions to the resource.  That means if what it's 
pointing at is a file, it doesn't end in a / and if it's a directory
it had better.

The behavior of web browsers to correctly reach directory URIs (which should
have / on the end) even though the fella at the keyboard didn't provide
them, is an effort towards the "robustness" that is demanded of web clients.
Also, after the first browser that came up with the bright idea of retrying
the URI with a / tacked when the first shot didn't work... customers want
this, and don't really think something is a "real web browser" if it does
not do this.  (I'm sure you guessed, such web browsers have waaaaay less
mindshare than lynx.)  

The more popular web servers also have special cases where they might provide 
the "expected thing" even though it's not precisely what the client requested.
I don't know how many proxy servers do, but proxies are not *supposed* to be 
changing anyone's URIs, so I could see a programmer not special casing their
own either.

> I have Lynx Version 2.8.1rel.2
> which is running on redhat 6.0 (in case that is relevant)

Probably not - or at least only as relevant as that it's Linux.  But we
definitely appreciate you mentioning these;  there's so many folk who
don't mention them when it matters a lot.

> Thanks
>       James

You're welcome.  I'm sure somebody will nitpick my description, or know
the relevant link on W3C or perhaps within the apache manuals, but I 
hope this helped anyway.  (Somewhere on www.w3c.org, or www.apache.org,
I'm sure there are much more techie details than anyone ever wanted to
know.  I'm also confident you can expand those to URLs that lynx can
accept :)

* Heather Stern * address@hidden * Starshine Technical Services *

reply via email to

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