mercurial/httppeer.py
changeset 39483 1fc39367eafd
parent 39445 cdb56f295b03
child 39484 98995b689e03
--- a/mercurial/httppeer.py	Fri Sep 07 23:36:09 2018 -0700
+++ b/mercurial/httppeer.py	Sat Sep 08 23:57:07 2018 +0800
@@ -84,9 +84,10 @@
             except httplib.IncompleteRead as e:
                 # e.expected is an integer if length known or None otherwise.
                 if e.expected:
+                    got = len(e.partial)
+                    total = e.expected + got
                     msg = _('HTTP request error (incomplete response; '
-                            'expected %d bytes got %d)') % (e.expected,
-                                                           len(e.partial))
+                            'expected %d bytes got %d)') % (total, got)
                 else:
                     msg = _('HTTP request error (incomplete response)')