lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV DIRED, URL parsing (was: Multiple bookmark file support)


From: Klaus Weide
Subject: LYNX-DEV DIRED, URL parsing (was: Multiple bookmark file support)
Date: Mon, 2 Dec 1996 17:31:31 -0600 (CST)

On Fri, 29 Nov 1996, Foteos Macrides wrote:
 
>       Also, there are still some DIRED_SUPPORT tweaks outstanding.

I know...

> I think the problems stem from v2.6 having become RFC compliant and
> not doing HTSimplify()'s for absolute paths.

I cannot find any significant change in that respect between 2.5 (actually,
a Lynx2-4-FM I am looking at) and 2.6.  So I assume that those changes 
were made already before 2.5 (or I don't look in the right places).

The trailing "/." or "/.."  in DIRED doesn't seem related to that, since
that occurs for relative paths.  (".." getting tagged on to the root
directory is a different case.  But then that's something about which
HTSimplify wouldn't, and shouldn't do anything.)

I do not understand why all those calls to HTSimplify in HTML.c are
there.  They seem to be unnecessary and to do more harm than good...
They are not really RFC 1808 compliant: the RFC talks about
simplification not of the relative URL, but of the URL path _after_
aName and relatedName have been combined.  And that is going on anyway,
when HTAnchor_findChildAndLink does its thing and invokes HTParse etc.,
so the explicit call to HTSimplify from HTML_start_element seems
unnecesary.  It can also mess up query strings and fragments which
should be left alone.
 
>                                                Before that, we were
> doing them for everything except gopher URLs, since those by definition
> are opaque, and I think the resolving for the Unix file://localhost/blah
> URLs depended on it.

>                       In any case, there shouldn't be trailing dot
> symbolic elements in the listings, so lets deal with that and be done
> with it.  

Well I was feeling about that like you about "fixing" strcmp (or whatever
it was recently); explicitly chopping those trailing dots in HTFile 
might cure a symptom but hide the real cause.

So I redid HTSimplify, this time based on RFC 1808, and throwing away
the previous implementation (after overcoming the awe induced by a
comment like /* Bug fix 12 Mar 93 TBL */...).  It works better now with
the RFC examples, see 
       <URL: http://www.tezcat.com/~kweide/lynxhacks/RURL2.html>.

The nice thing is that this also fixed _some_ of the DIRED weirdness
(specifically, the keeping of "/.." at end of an URL after g)oing
to an URL that ends with a dot) - without messing around in HTFile.c
at all!

I have to test the modified HTParse.c a bit more before I make it
available.

>           It's too hairy to think through just by looking at the code,
> so you or one of the Unix folks will have to finish that up.  I can't
> do substantive development on the Unix boxes to which I have access.

Hairy indeed.  But not only for local files..

  Klaus

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