lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev bug and patch for excluded dirs in reject.dat


From: Thomas Dickey
Subject: Re: lynx-dev bug and patch for excluded dirs in reject.dat
Date: Thu, 9 Aug 2001 19:29:59 -0400
User-agent: Mutt/1.2.5i

On Thu, Aug 09, 2001 at 02:56:53PM -0700, Brian S Queen wrote:
> I recently found a problem with the reject.dat mechanism for excluding
> directories during crawls.  The docs mention putting lines like:
> 
> http://www.serv1.com/cgi-bin/*
> 
> in reject.dat to exclude all such link from a traversal.  I found it was
> not working.  In particular I was trying to exclude all user dirs from
> my traversal with this line in reject.dat:
> 
> http://www.server2.com/~*
> 
> Anyway I poked around in the code and made the following patch which seems
> to have fixed it up.

it's perhaps better to simply explictly trim the trailing newline.
(thanks)
 
> Brian McQueen
> NASA/Ames
> NAS Division
> 
> %%% Created Thu Aug  9 14:47:03 PDT 2001 by target lynx.patch. %%%
> diff -bru orig/lynx2-8-4/src/LYTraversal.c lynx2-8-4/src/LYTraversal.c
> --- orig/lynx2-8-4/src/LYTraversal.c  Thu Dec 21 18:44:11 2000
> +++ lynx2-8-4/src/LYTraversal.c       Thu Aug  9 14:46:16 2001
> @@ -153,9 +153,9 @@
>      while (LYSafeGets(&buffer, ifp) != NULL && !result) {
>       len = strlen(buffer);
>       if (len > 0) {     /* if not an empty line */
> -         if (buffer[len-1] == '*') {
> +         if (buffer[len-2] == '*') {
>               /* if last char is * and the rest of the chars match */
> -             if ((len == 1) || (strncmp(line,buffer,len - 1) == 0)) {
> +             if ((len == 1) || (strncmp(line,buffer,len - 2) == 0)) {
>                   result = TRUE;
>               }
>           } else {
> 
> ; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

-- 
Thomas E. Dickey <address@hidden>
http://dickey.his.com
ftp://dickey.his.com

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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