hgweb Odd-string length error
Jérôme Godbout
jerome at bodycad.com
Thu Jul 10 14:59:01 UTC 2014
I tried without the proxy by using the document root directly pointing on
cgi-bin
DocumentRoot "${SRVROOT}/cgi-bin/"
<Directory "${SRVROOT}/cgi-bin/">
Require all granted
Options ExecCGI FollowSymLinks
AddHandler cgi-script .cgi
</Directory>
Changed the baseurl and staticurl into the web section of hgweb.config:
baseurl = /hgweb.cgi/
staticurl = /hgweb.cgi/static/
Accessing website with web browser
http://myserver/hgweb.cgi/ see the list ok
http://myserver/hgweb.cgi/MyRepos see the repos info ok
I still can browse the content with the web browser, but still got the
Odd-length string error when cloning repos. (Apache 2.4, Python 2.7.8,
Mercurial 3.0.2 python). Tested with 32 and 64 bits of Python/Apache. I
also created a new repos to serve (making sure a comment encoding was not a
problems), only have a single commit from repos default encoding (cp1252 on
Windows).
This is bare bone hgweb setup, cannot go with less to serve it. Is the .cgi
script still supported??? should I move to the .fcgi directly? would it
make any difference?
On Thu, Jul 10, 2014 at 1:28 AM, Matt Mackall <mpm at selenic.com> wrote:
> 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.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140710/aa01701c/attachment-0002.html>
More information about the Mercurial
mailing list