Augie Fackler <augie@google.com> [Wed, 11 Apr 2018 16:09:23 -0400] rev 37589
hgweb: put response headers back into str for Python 3
This fixes a lot of hanging tests on Python 3, because
"Content-Length" was getting sent as "b'Content-Length'" (yes, really)
and then clients would expect a close-is-end body instead of counting
off a certain number of bytes.
Differential Revision: https://phab.mercurial-scm.org/D3248
Augie Fackler <augie@google.com> [Wed, 11 Apr 2018 14:57:11 -0400] rev 37588
tests: load showstack in test-pull-http.t so network hangs are easier to find
This also gives us some minimal "it loads" coverage on showstack,
which I rather like. showstack doesn't work on Windows per mbarbison,
so it's disabled there.
I added this in service of debugging a hang introduced on Python 3 by
revision a88d68dc3ee8. I'm still not sure what the problem there is,
but this at least gives us a little bit of a chance to figure out
what's going on.
Differential Revision: https://phab.mercurial-scm.org/D3247
Augie Fackler <augie@google.com> [Wed, 11 Apr 2018 14:39:49 -0400] rev 37587
keepalive: rewrite readinto() to not use read()
It turns out http.client on Python 3 sometimes uses readinto() in the
implementation of read(). Unfortunately, Python 2 doesn't have a
readinto() in httplib's client, so we have to support both codepaths.
Subclassing is bad, folks.
Differential Revision: https://phab.mercurial-scm.org/D3246