According to Gabriele Bartolini:
> I discovered some bugs in the Document code. First of all I think we must
> decice which attribute should regard either a "per server" or a "per url"
> configuration.
>
> In the Document class constructor, for example, I found a bug regarding
> the "max_doc_size" attribute initialization. As I don't know it's been
> changed this way, I am now asking which is the purpose of that
> initialization: config.Value("url", u, "max_doc_size");
>
> The point is that the constructor of the Document class is called only
> with default arguments (and 'u' is not initialized). If we want to manage
> configuration attributes on a <url> basis, I think we need to provide
> Document class methods and members able to do that.
Yeah, there probably wasn't a lot of point in doing that in the constructor,
as the URL is unknown at that point, at least the way we use it now. Some
of the url-specific attributes are looked up in the Url() class, which makes
a lot more sense.
> So in order to make it work I changed this assignment into:
> config.Value("max_doc_size").
Problem is you also changed this in the Retrieve() method, at which point
the URL was known, so the code was working before, but now it's back to
global-only. The call I added to RetrieveLocal() is still there, though,
so now we have an inconsistency - max_doc_size can be set by URL, but only
for local URLs. Probably the best place would be in Url(), to do it once
for each URL, regardless of how it's retrieved. This of course assumes it
makes sense to have this attribute definable in url blocks - which I think
it does.
> I have a couple of questions to ask you:
>
> 1) Can you give me a list of attribute we want to depend either on a
> server or on a url configuration, please? For example, I know
> "persitent_connections" regards server.
I think the problem is no one developer claims to be an expert on all
attributes, so there's never been a coordinated effort to do this for
all attributes. We've been doing it on an ad-hoc basis as we realise
that for a particular attribute, it should be allowed in this or that
block.
Any volunteers to coordinate an overhaul of the whole collection?
> 2) What about "max_doc_size"?
> 3) And "max_retries"?
Probably url and server, respectively.
Question: What happens for an url-specific lookup if an attribute isn't
defined for that exact URL? Does it do a substring match, such that an
URL-block of <url: http://www.htdig.org/files> would apply to an URL of
http://www.htdig.org/files/binaries/README ? If there's no applicable
URL-block, does it fall back on an applicable server block before falling
back to the global value? (OK, that's 3 questions!) I don't know if
Vadim can shed some light, or if he's unsubscribed already.
> I think I am ready to leave for Paris now ... (better - I hope so).
Bon voyage, mon ami !
--
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 htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You will receive a message to confirm this.