SID-01654: Missing HTTP Header and Script Name
| Status: |
Answered |
TWiki version: |
5.1.3 |
Perl version: |
5.10.1 |
| Category: |
SearchEngineKinoSearchAddOn |
Server OS: |
Debian Squeeze |
Last update: |
13 years ago |
We've had an older version of TWiki and
SearchEngineKinoSearchAddOn up and running for many years. We are now trying to upgrade to a newer version.
We have successfully installed TWiki-5.1.3 on a fresh Debian squeeze virtual server and got it configured and restored all of our wiki data from the old version. Everything here is running perfectly.
Next we need to incorporate
SearchEngineKinoSearchAddOn as we have an external website that relies on it's output. We downloaded and installed the latest
SearchEngineKinoSearchAddOn without error using
SearchEngineKinoSearchAddOn_installer.
We have two issues (the first we've solved with a bandaid, the second we are still looking at).
Issue 1 -- Attempting a search from the TWiki/KinoSearch page results in an Error 500 with the following recorded in the apache error log:
[error] [client 10.1.3.108] malformed header from script. Bad header=<head>: kinosearch, referer:
https://wikidoc/TWiki/KinoSearch
After much testing, we discovered the resulting HTML page is being generated, but no HTTP header is output prior to the page delivery to apache.
If we add:
print "Content-type: text/html\n\n";
Just below the # let's start ... comment in
SearchEngineKinoSearchAddOn/Search.pm then we do get a proper search results page delivered to the web browser.
Or so we thought...
Issue 2 -- We have discovered an error in the HTML search results output, specifically the base href is generated as:
<base href="https://wikidoc/bin/<action />/TWiki/KinoSearch"></base>
Note "<action />" in there where the SCRIPTNAME should appear (based on the template for building the base href:
base href="%SCRIPTURL{%SCRIPTNAME%}%/%WEB%/%TOPIC%"
I did some testing by trying to display %SCRIPTNAME% in kinosearch.pattern.tmpl
and confirmed that SCRIPTNAME is blank at that point.
Has anyone seen this before? Any ideas on the cause or a fix?
Thanks!
--
Bill Gerrard - 2013-03-12
Discussion and Answer
This add-on is outdated, it needs some TLC. Someone needs to update it so that it runs on the latest TWiki. If inclined, hire one of the
TWikiConsultants to do that for you.
--
Peter Thoeny - 2013-05-01
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.