hgweb Odd-string length error
Matt Mackall
mpm at selenic.com
Thu Jul 10 05:28:15 UTC 2014
On Wed, 2014-07-09 at 15:31 -0400, Jérôme Godbout wrote:
> I got the same result if I remove the virtualhost and just a ScriptAlias
> into Apache (just loose the images loading):
>
> ScriptAlias /hg/ "C:/Program Files (x86)/Apache Software
> Foundation/Apache2.2/cgi-bin/hgweb.cgi/"
>
> <Directory "C:/Program Files (x86)/Apache Software
> Foundation/Apache2.2/cgi-bin/">
> Order allow,deny
> Allow from all
> AllowOverride All
> Options ExecCGI FollowSymLinks
> AddHandler cgi-script .cgi
> </Directory>
>
> Even If I try to use the root directory directly and set into config empty
> baseurl=
> ScriptAlias / "C:/Program Files (x86)/Apache Software
> Foundation/Apache2.2/cgi-bin/hgweb.cgi/"
>
> same result, Odd-length string. Is there any incompatibility between some
> python version and mercurial packages?!? everything point into that
> direction, cause the ScriptAlias to root directory is pretty stright foward
> into apache. Anybody have a working set of Python-mercurial installation
> with Apache 2.2 under windows (I wish I could just do it under Linux but I
> can't for this).
>
>
> On Wed, Jul 9, 2014 at 3:11 PM, Jérôme Godbout <jerome at bodycad.com> wrote:
>
> > Apache does not give me any error into it's log (easy to find I set up the
> > error and the vhost error log, both are empty of error, some debug info).
> > The Error log show nothing (even apache into debug error level). The
> > access info show:
> > 10.1.x.x - - [09/Jul/2014:14:38:49 -0400] "GET
> > /hg/MyRepos/?cmd=capabilities HTTP/1.1" 200 130
> > 10.1.x.x - - [09/Jul/2014:14:38:49 -0400] "GET /hg/MyRepos/?cmd=batch
> > HTTP/1.1" 200 1355
> >
> > Look like a problem with the proxy, anybody have any tips to set this into
> > virtual host for Apache (see first email for all config info)? Why can I
> > browse it and trace graph into the web page of the repos then?
> > If I set the hgweb into a virtual host for apache, does I have to set
> > something special into the hgweb.config file like proxy_web or something
> > like that? I already set the baseurl and staticurl. Anybody have a good
> > page for all the fields for this file?
> >
> > (btw the allow_pull variable should be = * or = True, seen both on the
> > wiki, my guess would be * for all user).
> >
> > If I try to fet the cmd manually by url
> > http://myserver/hg/MyRepos/?cmd=batch
> > I get the following if this can help:
> > ____________________________________
This is probably what's happening:
- the client asks for capabilities
- the server says "I can do batch commands and header-encoded args"
- the client sends a batch command with the commands in the headers
- the proxy strips the hg headers because security voodoo nonsense
- the server gets the batch command and tries to unpack the missing args
- the servers says "umm, wtf" and raises an exception
- your WSGI framework catches the exception...
- and helpfully sends a human-readable trace rather than an error code
- the client gets the trace and says "I got some gibberish"
Test without the proxy. Possibly on localhost. HTTPS is also worth
trying: among its many virtues is that proxies can't muck with it.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list