[issue1379] Clone large repositories through a proxy fails

azraiyl mercurial-bugs at selenic.com
Wed Nov 5 09:37:59 CST 2008


New submission from azraiyl <azraiyl at gmail.com>:

When I clone http://hg.mozilla.org/mozilla-central/ at home with Mercurial 1.0.2
I don't have any problems (compressed archive is about 102 MB). When I clone the
same repository at work, I get the following error:

zlib.error: Error -3 while decompressing: invalid code lengths set

When I clone the repository http://hg.mozilla.org/ast/ at work I have no problems.

After analyzing it a bit I discovered that the problem is that the data from the
server is wrong. I started debugging the function filechunkiter. f.url is:

http://hg.mozilla.org/mozilla-central/?cmd=changegroup&roots=0000000000000000000000000000000000000000

and f.headers is (maybe proxy version matters here):

Date: Wed, 05 Nov 2008 15:11:37 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Type: application/mercurial-0.1
X-Cache: MISS REMOVED.org
Via: 1.0 REMOVED.org:8080 (squid/2.6.STABLE20)
Proxy-Connection: close

Downloading any file with FireFox, Internet Explorer or downloading Debian
packages through this proxy was never a problem (ISOs with 600MB+ e.g.). When I
download the previous URL with FireFox I can see the same output (after
modifiend the source to see it) as when I "download" it with clone. But when I
look at the output I see a weird string in the first bytes.

x\x9c\xb4\xbd\xbbn$HTTP/1.1 200 Script output follows\r\nDate: Wed, 05 Nov 2008
15:19:10 GMT\r\nServer: Apache/2.2.3 (Red Hat)\r\nContent-Type:
application/mercurial-0.1\r\nConnection:
close\r\n\r\nx\x9c\xb4\xbd\xbbn$\xc9\xba.\xb6\xed\xb1\x8e<\x99\xcb\x13\xce\x11\x8al\x92}\x1bC\xc0a\x93\xeci\xaeMvs\xb3\xd83\xa3\rADVfTU6\xf3\xb62\xb2\xc8b\x0b\x82,\x01\x12d\

When I add an awfull hack that checks if the first packet includes this header
and strips everything before (and including) \r\n\r\n everything works well. BTW
I have replaced the keepalive handler with the standard handler, but that
doesn't change anything. The problem exist on Windows and Linux.

My conclusion: If there is an bug in mercurial (only disovered this with
mercurial so far in our company) if is on the server side and not the client side.

----------
messages: 7843
nosy: azraiyl
priority: bug
status: unread
title: Clone large repositories through a proxy fails

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1379>
____________________________________________________



More information about the Mercurial-devel mailing list