bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH][Feature request] global.cgi: Add a fallback redirect method


From: Shigio YAMAGUCHI
Subject: Re: [PATCH][Feature request] global.cgi: Add a fallback redirect method for webservers which do not support CGI redirects
Date: Tue, 12 Feb 2013 08:45:17 +0900

Hello again,
On Fri, 08 Feb 2013 00:10:56 +0100
Alain Kalker <address@hidden> wrote:

> It is possible (and very convenient :-) ) to serve the website generated 
> by `htags --suggest2` using nothing more than:
> 
> $ pwd > GTAGSROOT # to enable global.cgi to find the tags files
> $ (cd HTML; python -m http.server --cgi) # Python 3.x
>    or
> $ (cd HTML; python -m CGIHTTPServer) # Python 2.x

It seems that the built-in HTTP server class of python executes
CGI programs in the document root directory, not in the 'cgi-bin'
directory. Though this bug is reported in 2007, it is not fixed.

I added the following code in 'global.cgi' and 'completion.cgi'.

if ($form{'id'}) {
        ...
} elsif (-d "cgi-bin") {
        chdir("cgi-bin");       <== Added
        ...
}

With this workaround, you need not make 'GTAGSROOT' file.
I believe there is no bad influence.
This code will be included in the next release of GLOBAL.

Shigio
-- 
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]