lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV Why does Lynx... (was: Commenting on FOTEMODS comment)


From: Klaus Weide
Subject: LYNX-DEV Why does Lynx... (was: Commenting on FOTEMODS comment)
Date: Sat, 26 Apr 1997 15:04:14 -0500 (CDT)

On Sat, 26 Apr 1997, Foteos Macrides wrote:
[kw:]
> >Not true - try http://www.alis.com/../index.de.html.  They probably
> >made the server accept such URLs - and there's nothing wrong with that -
> >to account for improper relative URLs (previously?) found in some of their
> >pages.
> 
>       Yes, they hacked the server to do the "error recovery" equivalent
> to that in the FOTEMODS.

They my not have had to "hack" it, just to configure it so it does what
they want.  But of course you may know from something other than
speculation what they did, or whether something like this can be done just
by appropriate configuration for the NCSA/1.4 server.
[...]

> >                        - I didn't take those changes into the devel
> >code, so you are safe from this bug if you use that.
> 
>       How lucky for the devel code users.  Are you writing a "Why
> does Lynx do this?" supplement for "Lynx links" about the failures when
> the lead "../" isn't stripped (except for the Alis server)?  :) :) :)

Yes indeed.  Playing along here (instead of spoiling it by saying
whoever made Lynx 2.7 do what it does now should write that
supplement...), I have to say: Given the choice to either add yet
another piece of data-changing, protocol-violating code, or explain
"Why?", I personally choose the latter.  Of course somebody else may
decide differently and add that code to the development set, I am not
the only one who has access to it and have no monopoly on
incorporating your (or others') changes and don't want one.  That
somebody else might even be you, if/when you decide to have a more
direct role as a contributor to the development code.  [And I wouldn't
be so childish to start a war of undoing those changes again with my
next checkin.]

If you think this is the right thing for Lynx to do, I don't
understand why you don't put it in HTParse() so it will be taken care
of for all (http?) URLs.  What's specific to HTML about it?

Anyway, since most current Lynx users (I suspect) are using neither
our collective development code nor your latest patches, the following
should be useful to some of them, and it doesn't really matter how
lynx2-7-1+fotemods differs from lynx2.7.1ac-0.*.
Hereby submitted to Subir (if he wants it):

--------------------------------------------------------------------
Why do I sometimes get "Bad Request" (or "Not Found", or "Sorry,
Forbidden") when I follow a link?  It works with browser X.

One common reason for this problem is when authors use invalid
syntax for specifying relative links in their pages.

When Lynx finds a link in a HTML page which gives only a "relative
URL" as a destination (one that does not start with "http:" or "ftp:"
etc.), it has to convert it into an absolute URL before you can follow
that link.  (Every browsers has to do this.)  Lynx tries to obey the
rules for how this is done, as they are laid down in the technical
documents (currently Proposed Standard RFC 1808 is the most
authoritative).  Other browsers, or older versions of Lynx, may not
follow those rules in some cases.

One of those rules is about relative URLs that start with "../" (two
dots and a slash).  If the "../" would end up at the beginning of an
URL's "path" (that is, directly after the
"http://www.something.com/";), the RFC specifies to leave it alone and
use the URL as it is, still containing "../".  So Lynx does just as it
is told, while some other browsers silently try to "fix" URLs of this
kind (which usually are mistakes by page authors who don't properly
understand what they are doing).  Such clandestine "fixing" is not
only against the specs, its also makes things seem to work correctly
while hiding problems with invalid references among documents from
their authors.  (Those problems may then unexpectedly show up later,
for example when a collection of pages is moved to a different URL
location.)

So Lynx does not hide these author mistakes from you, but as long as
the GOTO command (usuall the 'g' key) is enabled, you can try to
manually correct an invalid URL.  Lynx 2.7 makes this much more
convenient with a new command normally mapped to (capital) 'G', "edit
the current document's URL and go to it".  If you get a "Bad Request"
page (or similar), simply press 'G' and correct the invalid URL, for
example by deleting an invalid occurance of "../", then press the
Enter key.  (But of course, if the link you are trying to follow
points to something that just isn't there any more, all this won't
help.)

You may also want to notify the owners or authors of such pages that
they are using invalid links, which reflects badly on them.


;
; 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]