CGIT not working with PATH_INFO under Ubuntu 10.04 / Lighttpd

Lars Hjemli hjemli at gmail.com
Mon Mar 7 08:52:15 CET 2011


[added cc:cgit list]

On Mon, Mar 7, 2011 at 02:09, Angus Turnbull <angus at twinhelix.com> wrote:
> I've compiled CGIT v0.8.3.5 against Git 1.7.3 under Ubuntu 10.04.2 LTS
> on a Xen HVM VPS with the default compiler g++ 4.4.3-4ubuntu5,
> zlib1g-dev 1.2.3.3.dfsg-15ubuntu1, libssl-dev 0.9.8k-7ubuntu8 and served
> with lighttpd 1.4.26.
>
> The web interface will load and list respositories, but as soon as you
> click one, it displays the root title header and hangs as soon as it
> gets to "Name" and "Description". This is with a URL
> like /cgit/reponame/ -- I've got it on http://git.twinhelix.com if you
> want to see it. Manually keying in /cgit?r=reponame results in the
> expected repo contents list.

This is very strange. On you site, /cgit?r=fsmenu works as expected,
while /cgit?url=fsmenu does not, and instead shows a path-filtered
repolist (url=fsmenu is how $PATH_INFO is handled internally).

When specifying r=fsmenu, "fsmenu" is passed as argument to
cgit_get_repoinfo() [1], and when specifying url=fsmenu, "fsmenu" is
passed as argument to cgit_parse_url() [2], which in turn invokes
cgit_get_repoinfo() [3] on its argument. This should Just Work.

If you could add a fprintf() to cgit_get_repoinfo() [4], like this

  fprintf(stderr, "cgit_get_repoinfo(%s)\n", url);

and report back what you get in your webserver logfiles when accessing
  /cgit/fsmenu
  /cgit?r=fsmenu
  /cgit?url=fsmenu

That might help us pin down the cause of the problem.

--
larsh

[1] http://hjemli.net/git/cgit/tree/cgit.c?h=stable#n206
[2] http://hjemli.net/git/cgit/tree/cgit.c?h=stable#n211
[3] http://hjemli.net/git/cgit/tree/parsing.c?h=stable#n26
[4] http://hjemli.net/git/cgit/tree/shared.c?h=stable#n72




More information about the CGit mailing list