[issue2710] http basic authentication prevents keepalive from working correctly
Wagner Bruna
bugs at mercurial.selenic.com
Thu Mar 17 17:58:21 UTC 2011
New submission from Wagner Bruna <wagner.bruna+mercurial at gmail.com>:
http basic authentication seems to practically disable the keepalive
mechanism. This can be observed by using keepalive.py debug facilities,
and/or checking the traffic with wireshark.
Each new unauthenticated http request (see issue1876 ) opens a new
connection; interestingly, the subsequent authenticated http request does
reuse the connection.
With the following quick hack:
diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py
--- a/mercurial/keepalive.py
+++ b/mercurial/keepalive.py
@@ -273,6 +287,9 @@ class KeepAliveHandler:
r.msg = r.reason
if r.status == 200 or not HANDLE_ERRORS:
+ if r.status == 401:
+ h.close()
+ pass
return r
else:
return self.parent.error('http', req, r,
the connections *seems* to be reused, but only from keepalive.py POV;
Wireshark still shows a lot of new connections being opened.
Remote is hg stable (1.8.1+) serving through https; tested with both 1.5.4
and 1.8.1 clients.
----------
messages: 15716
nosy: wbruna
priority: bug
status: unread
title: http basic authentication prevents keepalive from working correctly
topic: http_proto
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2710>
____________________________________________________
More information about the Mercurial-devel
mailing list