On Mon, 16 Jul 2001, Gilles Detillieux wrote:
> Date: Mon, 16 Jul 2001 18:03:32 -0500 (CDT)
> From: Gilles Detillieux <[EMAIL PROTECTED]>
> To: Joe R. Jah <[EMAIL PROTECTED]>
> Cc: Geoff Hutchison <[EMAIL PROTECTED]>,
Dante Picca <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Subject: Re: [htdig] PATCH for 3.1.5's url_part_aliases bug (was: htdig and
relative urls)
>
> According to Joe R. Jah:
> > To get a pure relative URL page in order to have the browser prepend the
> > rest of the URL you can do:
> >
> > indexing.conf:
> > url_part_aliases: http://users.mysite.it/ *2
> >
> > searching.conf:
> > url_part_aliases: /./ *2
> >
> > First I tried it with just "/", but if you do it like:
> >
> > searching.conf:
> > url_part_aliases: / *2
> >
> > You would get a premature end of script error in your server error log.
> > There may be a way to patch htlib/HtWordCodec.cc to allow that too. I
> > think it expects more than one character;-/
>
> OK, I finally took some time to get to the bottom of this one, which was
> a bit of a pain to track down. The problem isn't the HtWordCodec class
> itself. It handles single characters just fine. The problem is the way
> htsearch 3.1.5 uses the class. 3.2 doesn't suffer from this problem.
>
> The problem is that the URL gets decoded just fine, but then when htsearch
> needs to look up the db.docdb record for a given URL, it re-encodes the
> URL. This is because in 3.1, the db.docdb is keyed by URL, not by docID
> as in 3.2. But, when you re-encode / to *2, all slashes get hit, so it
> can't find the matching docdb record. The fix is to keep the encoded
> URL for docdb lookups.
>
> Here's the patch for 3.1.5, to fix the problem. NOTE: THIS PATCH IS
> INCOMPATIBLE WITH THE dateRange.1 PATCH ON ftp.ccsf.org! See below for
> the fix. Apply this patch by cutting it out of this message, saving it
> to a file, and using "patch -p0 < your-file".
I split your patch into two patches, and modified the above instruction in
them:
ftp://ftp.ccsf.org/htdig-patches/3.1.5/url_part_aliases.0
ftp://ftp.ccsf.org/htdig-patches/3.1.5/url_part_aliases4dateRange.0
> As always, feedback is welcome. Please let me know if there are any problems
> with this code.
Thank you, Thank you, Thank you. It works like a charm. Finally pure
relative URLs without the ugly "/./" workaround;)
Regards,
Joe
--
_/ _/_/_/ _/ ____________ __o
_/ _/ _/ _/ ______________ _-\<,_
_/ _/ _/_/_/ _/ _/ ......(_)/ (_)
_/_/ oe _/ _/. _/_/ ah [EMAIL PROTECTED]
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html