According to me:
> The problem happens during URL normalization.  The removeIndex() function
> strips off the index.html part (or any part in remove_default_doc).
> Unfortunately, it uses the wrong test.
> Around line 443 in htlib/URL.cc, it does:
> 
>     if (defaultdoc->hasPattern() &&
>             defaultdoc->FindFirstWord(path.sub(filename)) >= 0)
> 
> It really should use CompareWord rather than FindFirstWord, so that it
> doesn't search for a matching substring.


Of course, CompareWord has a different return value than FindFirstWord,
so here's the patch to use:

--- htlib/URL.cc.orig   Wed Apr 21 21:47:58 1999
+++ htlib/URL.cc        Fri Jun 11 12:24:40 1999
@@ -440,7 +440,7 @@ void URL::removeIndex(String &path)
       l.Release();
     }
     if (defaultdoc->hasPattern() &&
-            defaultdoc->FindFirstWord(path.sub(filename)) >= 0)
+            defaultdoc->CompareWord(path.sub(filename)))
        path.chop(path.length() - filename);
 }
 
Scott and Robin, I'd appreciate it if you'd both try this out and let me
know if a) it fixes the problems you reported, and b) it does still strip
off the real "index.html" file names as it should.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to