Re: [htdig] url_part_aliases

Subject: Re: [htdig] url_part_aliases
From: Jim Cole (
Date: Thu Sep 07 2000 - 02:21:17 PDT

Gilles Detillieux's bits of Wed, 6 Sep 2000 translated to:

>Which platform are you running ht://Dig on, and did you use a pre-compiled
>binary or build from source?

Platform is i86 Linux, kernel version 2.2.13. ht://Dig was built from
source with gcc 2.95.2 (or possibly egcs-2.91.66 -- don't remember
exactly when I upgraded the compiler).

>I took a quick look at the code that merges databases, and it doesn't
>seem to do any URL encoding or decoding at all using url_part_aliases,
>which could lead to some problems, but I don't think those would be
>related to what you're running into. If only database A uses encodings,
>and B is folded into A rather than the other way around, I don't think
>that would be a problem as long as none of the unencoded URLs in B are
>supposed to override encoded URLs in A.

Figuring that I was just failing to understand the online documentation
for url_part_aliases, I decided to dive into the code in order to get at
the definitive documentation =) From that, I could see quite clearly, I
think, the cause of the problem. Related to what you said above, I think
it all comes down to the fact that the merge doesn't do any encoding or
decoding related to url_part_aliases.

In database A, I have some URL's of the form...


which I need to "rewrite" as /newname/fileA

so I use something like /~name *1c in the dig config and /newname *1c in
the search config.

In database B, I have some URL's of the form...


When they are merged, they retain this form. But during the search, the
encode method of HtURLCodec tries to turn them into something like
*1c/fileB due to the url_part_aliases attribute in the search config.
And of course, dbf->Get() in DocumentDB fails because the document is
stored with .../newname/fileB as its key.

If I have this right, then I believe the last bit of the trick to get
things working the way I want is to run htdig on database A just as I
have been doing, but run htdig on database B using the url_part_aliases
settings in the search config file. Or maybe I am just deluding myself :)
Off to dig again.


To unsubscribe from the htdig mailing list, send a message to
You will receive a message to confirm this.
List archives: <>
FAQ: <>

This archive was generated by hypermail 2b28 : Thu Sep 07 2000 - 02:23:11 PDT