Subject: Re: [htdig] calculated keywords not finding their way from wrapper to
From: Gilles Detillieux (email@example.com)
Date: Fri Oct 13 2000 - 13:45:06 PDT
According to Filippo A. Salustri:
> I have the cgi wrapper for htsearch print out the command it is using.
> So in:
> open (IN, "$htsearch -c $digconf words='$query' | ")
> $query expands to:
> And yes, I've configured htsearch to use boolean searching.
> Once again, the problem is:
> 1) If I use a text input field to type in the query above (of course
> without the '+'s), then the query is successful. The query is correctly
> reflected by the value of the $(WORDS) variable in my templates.
> 2) If I click on a link that causes the wrapper to create the query
> string above, the query fails with the error:
> Error: Expected a search word at the end
> and the $(WORDS) variable which I have in my output template is the null
> I have checked the value of all environment variables (from %ENV) but I
> cannot find any substantive differences.
This is a bit of a stumper. After reading your expanded description,
but before getting to the last sentence above, I was inclined to think
that the only thing that could account for the different behaviour was a
difference in the environment variables. You see, if the REQUEST_METHOD
environment variable is set, htsearch ignores any query string passed as
a command line argument, and instead uses the query string obtained from
the CGI GET or POST method. This is because, for the GET method at least,
the web server will give a partially parsed query string as arguments,
but not in a format that htsearch is designed to handle, as it's designed
to deal with the raw query. I would have guessed that maybe in case
(1) above, this environment variable was getting cleared, so it did look
at the argument, while in case (2) it was still set to GET or POST, and
htsearch couldn't find a usable query string in its environment or input.
In any case, you may want to try explicitly clearing REQUEST_METHOD
before calling htsearch, and see if that helps.
-- Gilles R. Detillieux E-mail: <firstname.lastname@example.org> 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@example.com You will receive a message to confirm this. List archives: <http://www.htdig.org/mail/menu.html> FAQ: <http://www.htdig.org/FAQ.html>
This archive was generated by hypermail 2b28 : Fri Oct 13 2000 - 13:49:45 PDT