lynx-dev
[Top][All Lists]
Advanced

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

Re: BUG BUG BUG (was Re: [Lynx-dev] lynx2.8.7dev.5)


From: Thorsten Glaser
Subject: Re: BUG BUG BUG (was Re: [Lynx-dev] lynx2.8.7dev.5)
Date: Sun, 20 May 2007 10:44:45 +0000 (UTC)

Dixi:

>>Some time in between 2.8.7dev.2 and 2.8.7dev.5 this broke:
>
>Probably in dev.4 also, I remember this on Debian GNU/kFreeBSD with
>the lynx-cur package _before_ 2.8.7dev.5 was released.
>
>>Can't Access ‘file://localhost/~/’
>>Alert!: Unable to access document.
>>
>>lynx: Can't access startfile 
>
>With some traces added:
>
>=== file://localhost/~/
>
>/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c: 222: HTParse: 
>aName:`file://localhost/~/'
>/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c: 223:    
>relatedName:`'
>/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c: 240:    want: 
>access
>/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c: 598: HTParse:  
>    result:`file'
>/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5322: 
>FindLeadingTilde('file://localhost/~/', TRUE)
>/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5331: :-> notfound '//localhost/~/'
>/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5331: :-> notfound '/localhost/~/'
>/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5327: :-> found in '/~/'
>/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5338: :=> yes '~/'
>/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5377: LYTildeExpand 
>file://localhost/~/
>/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5398: expanded path 
>file://localhost/~/
>/usr/src/gnu/usr.bin/lynx/src/LYGetFile.c: 794: 
>/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c: 385: Entered 
>HTAnchor_findAddress
>/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c: 461: New 
>anchor 0x83807100 has hash 890 and address `file://localhost/~/'
>/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.c: 745: 
>HTAccess: loading document file://localhost/~/

This gets worse...

>=== file://localhost/~/.

file://localhost/~/./ actually works, but this is not what I want.

But if I apply this diff:

--- src/LYUtils.c.orig  Sun May 20 10:37:10 2007
+++ src/LYUtils.c       Sun May 20 10:41:54 2007
@@ -5384,8 +5384,11 @@ char *LYTildeExpand(char **pathname,
 
            FREE(first);
            FREE(second);
-       } else if (temp[1] == '\0') {
+       } else if ((temp[1] == '\0') ||
+                  (LYIsPathSep(temp[1]) && temp[2] == '\0')) {
            StrAllocCopy(*pathname, wwwName(Home_Dir()));
+           if (LYIsPathSep(temp[1]))
+               StrAllocCat(*pathname, PATHSEP_STR);
        }
        CTRACE((tfp, "expanded path %s\n", *pathname));
     }

(maybe removing the "&& temp[2] != '\0'" in line 5371 would be enough),
doesn't help, BECAUSE THE EXPANDED PATH RESULT IS NOT USED:

/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c: 222: HTParse: 
aName:`file://localhost/~/'
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c: 223:    
relatedName:`'
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c: 240:    want: 
access
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c: 598: HTParse:   
   result:`file'
/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5369: LYTildeExpand file://localhost/~/
/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5393: expanded path /data/tg/
/usr/src/gnu/usr.bin/lynx/src/LYGetFile.c: 794: 
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c: 385: Entered 
HTAnchor_findAddress
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c: 461: New 
anchor 0x80ab94c0 has hash 890 and address `file://localhost/~/'
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.c: 745: HTAccess: 
loading document file://localhost/~/
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.c: 391: 
get_physical file://localhost/~/

WTF?

//mirabile
-- 
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.              -- Coywolf Qi Hunt




reply via email to

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