lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV Re: Goto URLs history list bug Re: unanswered queries (2)


From: Randall
Subject: LYNX-DEV Re: Goto URLs history list bug Re: unanswered queries (2)
Date: Tue, 17 Mar 1998 13:05:18 -0800

Well it looks like the bug may be simpler than I had guessed...

In LYConvertToLocalURL,  is_local == FALSE  section:
if ! LYExpandHostForURL, we need to restore AllocatedString to the
original 'old_string', rather than append to it the local file guess 'temp'.


BENEFIT:
The G/oto history list is correct in the case of nonexistant hostnames;
the bug is fixed.

NOTE / question / issue:
Now the error message is "Badly formed address"; previously it was
"Unable to access document".  Which is the desired behavior?  Or should
it say "Unable to connect to remote host"?

For comparison, if I put the following in a file:
   <a href="http://wig.mit.edu";>http://wig.mit.edu</a>
and try to follow the link, the error message is:
   Unable to connect to remote host.
If i put this in a file:
   <a href="wig.mit.edu">wig.mit.edu</a>
it is interpreted as referring to a file in the cwd, and the error message is:
   Unable to access document.

COST:
Presumably an extra host lookup, generating a little more Net traffic, as
we attempt to load a (known-nonexistant) remote URL.  (With the bug, lynx
always tried to load a local file in the case of known failure.)

PATCH:
--- LYUtils.c.orig      Sat Mar  7 11:01:44 1998
+++ LYUtils.c   Tue Mar 17 10:45:24 1998
@@ -4236,7 +4236,8 @@
                        StrAllocCopy(*AllocatedString, old_string);
                    }
                } else {
-                   StrAllocCat(*AllocatedString, temp);
+                 /* RW 1998Mar16  Restore AllocatedString to 'old_string' */
+                   StrAllocCopy(*AllocatedString, old_string);
                }
                if (TRACE) {
                    fprintf(stderr, "Trying: '%s'\n", *AllocatedString);


I made and tested this patch on Linux.  Who would like to test it on some
other platforms for good measure?  Specifically I am running Linux 2.0.0
Slackware 3.0 on i586.  Lynx 2.8rel.2, --with-screen=slang (downloading slang
is more productive use of time than making lynx compile for slackware-ncurses),
no extras.


Question about j/umps -- as far as I have noticed scanning the LYK-JUMP
section the changed code-path is irrelevant to jumps, but I've missed
something please try this out.  I've not bothered to test jumps
just-in-case, as I do not have/use jumpfiles.


Tests / features / observations:

lynx ver  g/oto typed    webpage/message displayed     history list
--------  -----------    -------------------------     ------------
rel       wig.mit.edu    Unable to access document     file://localhost/...
2.8RW     wig.mit.edu    Badly formed address          wig.mit.edu
rel       cauce.org      + Unable to access document   file://localhost/...
2.8RW     cauce.org      + Badly formed address        cauce.org
all       mit.edu        % http://web.mit.edu/         http://mit.edu/
all       cauce          http://www.cauce.org/         http://www.cauce.org/
all       mit            http://www.mit.edu/           http://www.mit.edu/
all       rahul.net      % http://rahul.net/           http://rahul.net/

2.8RW =  2.8rel.2 + my fix
2.8   =  2.8rel.2
2.7.2 =  2.7.2 + 272fixes + SSLeay
rel   =  both released versions, 2.7.2 & 2.8
all   =  all 3

% Presumably these are aliases at server side or in DNS
  (http://rahul.net/ is same web page as http://www.rahul.net/)
+ Lynx tries www.cauce.org.org, but not www.cauce.org (!)


I did NOT attempt to change the behavior regarding local file names in the goto
history list (there are changes for some non-existant "files" treated
as remote URLs).  I don't have a problem with any of the following behavior,
but it doesn't seem entirely consistent, so i'll list it here and maybe
someone would be insterested in commenting on what the behavior should be.

typed in with g/oto                  in goto history list
-------------------                  --------------------
exist.in.cwd                      +  file://localhost/Path/exist.in.cwd
no.exist.in.cwd            #%*   *-  no.exist.in.cwd
../Dir/exist                      +  file://localhost/Path/Dir/exist
../Dir/no.exist            %*    *-  ../Dir/no.exist
/Path/exist                       +  file://localhost/Path/exist
/Path/no.exist             $      +  file://localhost/Path/no.exist
file:exist.or.not.cwd      #%*   *-  file:exist.or.not.cwd
file:../Dir/exist.or.not   %*    *-  file:../Dir/exist.or.not
file:/Path/exist                  +  file://localhost/Path/exist
file:/Path/no.exist        $      +  file://localhost/Path/no.exist
file:///Path/exist                +  file://localhost/Path/exist
file:///Path/no.exist      $      +  file://localhost/Path/no.exist

+ changed (from typed string to history list)
- unchanged
% "Badly formed address"
$ "Unable to access document"
# lynx looks up remote guesses (so probably irrelevant here)
* CHANGED behavior from 2.8rel.2


=randall      <address@hidden>

reply via email to

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