Are you sure?  I override current config parameters using this type of
call inside libhtdig.. works fine.

I am pretty sure. So far indeed, the 'head_before_get' has always been a sub-option of the persistent connection feature, which means that head before get is not handled if persistent connections are off.

Also, the option works on a per-server configuration as well, which will eventually override the global setting.

The workaround I have written - included in the attached patch - is to add a piece of information to both the Retriever and the Document classes and to activate (or deactivate) the HeadBeforeGet feature of the HTTP-ish classes according to:

- the server settings
- the fact that we are now performing an incremental indexing

Basically, htdig sets a RetrieverType variable to be 'Initial' or 'Incremental' into the Retriever Object. This object informs then the Document class that we are performing (or not) an initial indexing. When retrieving the document, the Document class now always check for the head before get option but always activate it when the indexing is set to 'incremental'.

I also added a few lines to the defaults.cc file. Please give it a look and tell me if the patch sounds good. If yes, I will apply as soon as possible. I made a few simple tests and it works.

Let me know,
-Gabriele

Attachment: patch-headbeforeget.0.gz
Description: Binary data

--
Gabriele Bartolini: Web Programmer, ht://Dig & IWA/HWG Member, ht://Check maintainer
Current Location: Melbourne, Victoria, Australia
[EMAIL PROTECTED] | http://www.prato.linux.it/~gbartolini | ICQ#129221447
> "Leave every hope, ye who enter!", Dante Alighieri, Divine Comedy, The Inferno

Reply via email to