hgweb Odd-string length error
Jérôme Godbout
jerome at bodycad.com
Mon Jul 21 20:02:04 UTC 2014
Here's the hex string of the batch cmd answer that failed (no other command
are sent):
20cf3079890e50e549c6b7ee080045000108445a4000800600000a011ec30a011e660050ce35dd2e91a2eb5031fc501800ff52250000485454502f312e312032303020536372697074206f757470757420666f6c6c6f77730d0a446174653a204d6f6e2c203231204a756c20323031342031383a30353a353520474d540d0a5365727665723a204170616368652f322e342e39202857696e363429204f70656e53534c2f312e302e31660d0a436f6e74656e742d4c656e6774683a2034320d0a436f6e74656e742d547970653a206170706c69636174696f6e2f6d657263757269616c2d302e310d0a0d0a373739643136353935353832363161636462646335613833626264366130383162343265656466620d0a3b
Once decoded (used Python string.decode("hex"))
' \xcf0y\x89\x0eP\xe5I\xc6\xb7\xee\x08\x00E\x00\x01\x08DZ@
\x00\x80\x06\x00\x00\n\x01\x1e\xc3\n\x01\x1ef\x00P\xce5\xdd.\x91\xa2\xebP1\xfcP\x18\x00\xffR%\x00\x00HTTP/1
.1 200 Script output follows\r\nDate: Mon, 21 Jul 2014 18:05:55
GMT\r\nServer: Apache/2.4.9 (Win64) OpenSSL/1.0.1f\r\nContent-Length:
42\r\nContent-Type: application
/mercurial-0.1\r\n\r\n779d1659558261acdbdc5a83bbd6a081b42eedfb\r\n;'
The payload is: 779d1659558261acdbdc5a83bbd6a081b42eedfb
Which match the repos head hash, so the answer is correct,
If I try with TortoiseHg serve (work to clone from this one):
20cf3079890e50e549c6b7ee0800450000fd18274000800600000a011ec30a011e660050ce4f5816f1ae88bc5fe7501800ff521a0000485454502f312e312032303020536372697074206f757470757420666f6c6c6f77730d0a446174653a204d6f6e2c203231204a756c20323031342031393a35363a303020474d540d0a5365727665723a2042617365485454502f302e3320507974686f6e2f322e372e360d0a436f6e74656e742d547970653a206170706c69636174696f6e2f6d657263757269616c2d302e310d0a436f6e74656e742d4c656e6774683a2034320d0a0d0a373739643136353935353832363161636462646335613833626264366130383162343265656466620a3b
" \xcf0y\x89\x0eP\xe5I\xc6\xb7\xee\x08\x00E\x00\x00\xfd\x18'@
\x00\x80\x06\x00\x00\n\x01\x1e\xc3\n\x01\x1ef\x00P\xceOX\x16\xf1\xae\x88\xbc_\xe7P\x18\x00\xffR\x1a\x0
x00HTTP/1.1 200 Script output follows\r\nDate: Mon, 21 Jul 2014 19:56:00
GMT\r\nServer: BaseHTTP/0.3 Python/2.7.6\r\nContent-Type:
application/mercurial-0.1\r\nCon
nt-Length: 42\r\n\r\n779d1659558261acdbdc5a83bbd6a081b42eedfb\n;"
again, the payload is the same, the only difference I can see is the last
\n vs \r\n. Is it the \r\n that mess parsing or something like that?!? Bad
slice of the answer?! If this is not the problem I'm a bit out of ammo to
see what is going on.
On Mon, Jul 21, 2014 at 3:04 PM, Jérôme Godbout <jerome at bodycad.com> wrote:
> I try wireshark, but as I suspected, does not give me much, encoded
> payload communication, "?cmd=batch" request return code 200 with a payload
> (not much I can do with that). Try to compare with a hg serve directly not
> much difference except the header server: hg serve is BaseHTTP/0.3
> Python/2.7.6 and the hgweb under apache is Apache/2.4.8 (Win64)
> OpenSSL/1.0.1f
>
> Http layer:
> They both are http/1.1
> They both have Response Phrase: Script output follows
> They both have content type: application/mercurial-0.1
>
> the working one have a much lower byte count into the payload 96 bytes
> versus 278 for the non working version for answering the batch cmd.
> Look like something went wrong into python and it print a stack trace I
> guess. But it's not clear text so I'm just supposing about that.
>
> Anybody have a working hgweb under Windows???
> (If I cannot solve this soon, I'm probably heading to move this project
> under git, since I cannot change the platform for this project sadly)
>
>
>
> On Wed, Jul 16, 2014 at 3:06 PM, Matt Mackall <mpm at selenic.com> wrote:
>
>> On Wed, 2014-07-16 at 10:15 -0400, Jérôme Godbout wrote:
>> > Not sure if the problems lie into the client handling the answer or the
>> > actual data shape send by server (not much knowledge about the protocol
>> > used by mercurial here). Any other way to debug this? Anyone have a
>> slight
>> > idea why? (time like those I wish my work was on *nix machine!)
>>
>> https://www.wireshark.org/download.html
>>
>>
>> --
>> Mathematics is the supreme nostalgia of our time.
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140721/47346bf1/attachment-0002.html>
More information about the Mercurial
mailing list