Mercurial > public > mercurial-scm > hg-stable
diff mercurial/url.py @ 9726:430e59ff3437
keepalive: handle broken pipes gracefully during large POSTs
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 02 Nov 2009 11:03:22 -0500 |
parents | 4c041f1ee1b4 |
children | 917cf6bb6d0c |
line wrap: on
line diff
--- a/mercurial/url.py Thu Nov 05 15:18:56 2009 +0100 +++ b/mercurial/url.py Mon Nov 02 11:03:22 2009 -0500 @@ -408,10 +408,14 @@ self.close_all() if has_https: - class httpsconnection(httplib.HTTPSConnection): + class BetterHTTPS(httplib.HTTPSConnection): + send = keepalive.safesend + + class httpsconnection(BetterHTTPS): response_class = keepalive.HTTPResponse # must be able to send big bundle as stream. - send = _gen_sendfile(httplib.HTTPSConnection) + send = _gen_sendfile(BetterHTTPS) + getresponse = keepalive.wrapgetresponse(httplib.HTTPSConnection) class httpshandler(keepalive.KeepAliveHandler, urllib2.HTTPSHandler): def __init__(self, ui):