[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Enhancements to global.cgi
From: |
Taisuke Yamada |
Subject: |
Re: [PATCH] Enhancements to global.cgi |
Date: |
Wed, 28 Jul 2010 12:58:13 +0900 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
Hi,
>> - In addition to "sitekey" file, it also looks for subdir under
>> configured search path. [snip]
>> - Supports multiple search path for sitekey/subdir lookup.
>
> What is the search path? How to use it?
> Does the configuration mean htconfig(1) in debian package?
Instead of embedding "/path/to/gtags/sitekeys/" path, you can
specify where to look with following configuration:
=== /etc/gtags/htmake.conf ===
$GSPATHDATA = '/usr/share/gtags/sitekeys:/d/src';
This allows support of both "sitekey" based lookup and simpler
"subdir" lookup. In above example, I have my projects in
/d/src/<project>/{GTAGS, ..., HTML/}
folder style, so after adding "/d/src" in search path, I don't
need to maintain sitekey file for each projects.
I happen to use $GSPATHDATA / htmake.conf, but it's not compatible
with original Debian package anymore. Maybe I can come up with
additional fix to include backward compatibility.
>> - Runs under server-less mode, [snip] This means you can
>> browse/search HTML-ized source code without running a server.
>
> Since I don't know CLI web browsers in detail, I will study them.
> If it is convenient for users, I will put it on the TODO list.
IMHO, server-less CGI mode is a nifty feature and adds global
a nice interactive source browser just like (I'd say "better
than") cscope.
Althrough CLI browsers tries to simulate server-executed CGI
environment, they tend to make current global.cgi confused.
So I added a hook (HTAGS_DIR, HTAGS_URL) to make it easier to
run under serverless mode.
>> - Better support for bookmark and remote links even under system-
>> wide CGI mode. It used to break as these links never come with
>> proper Referer: URL.
>
> I don't understant this too. Is this a bug fix?
Current global.cgi tries to detect base URL of HTML-ized source
through $HTTP_REFERER. However, this won't work if system-wide
global.cgi is linked from remote page or bookmark. Consider following
use-case:
Linking from: http://foohost/wiki/?CodeExplanation
Linking to: http://barhost/cgi-bin/global.cgi?id=baz&pattern=xxxfunc
Access from "CodeExplanation" page will come with following HTTP header:
Referer: http://foohost/wiki/?CodeExplanation
Now, global.cgi cannot generate correct URL to each HTML-ized source, as
HTTP_REFERER is not in expected format.
This is only a issue with "system-wide" mode, as for "per-project" mode,
"HTML/" folder can always be referred with "..". However, as current
global.cgi always checks HTTP_REFERER first, it also has a issue.
Best Regards,
Taisuke Yamada