##// END OF EJS Templates
httppeer: calculate total expected bytes correctly...
av6 -
r39519:1fc39367 default
parent child Browse files
Show More
@@ -84,9 +84,10 b' def _wraphttpresponse(resp):'
84 84 except httplib.IncompleteRead as e:
85 85 # e.expected is an integer if length known or None otherwise.
86 86 if e.expected:
87 got = len(e.partial)
88 total = e.expected + got
87 89 msg = _('HTTP request error (incomplete response; '
88 'expected %d bytes got %d)') % (e.expected,
89 len(e.partial))
90 'expected %d bytes got %d)') % (total, got)
90 91 else:
91 92 msg = _('HTTP request error (incomplete response)')
92 93
@@ -275,7 +275,7 b' Server sends an incomplete capabilities '
275 275 $ cat hg.pid > $DAEMON_PIDS
276 276
277 277 $ hg clone http://localhost:$HGPORT/ clone
278 abort: HTTP request error (incomplete response; expected 416 bytes got 20)
278 abort: HTTP request error (incomplete response; expected 436 bytes got 20)
279 279 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
280 280 [255]
281 281
@@ -600,7 +600,7 b' Server sends partial bundle2 header magi'
600 600
601 601 $ hg clone http://localhost:$HGPORT/ clone
602 602 requesting all changes
603 abort: HTTP request error (incomplete response; expected 1 bytes got 3)
603 abort: HTTP request error (incomplete response; expected 4 bytes got 3)
604 604 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
605 605 [255]
606 606
@@ -624,7 +624,7 b' Server sends incomplete bundle2 stream p'
624 624
625 625 $ hg clone http://localhost:$HGPORT/ clone
626 626 requesting all changes
627 abort: HTTP request error (incomplete response; expected 1 bytes got 3)
627 abort: HTTP request error (incomplete response; expected 4 bytes got 3)
628 628 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
629 629 [255]
630 630
@@ -733,7 +733,7 b' Server stops after bundle2 part payload '
733 733 adding changesets
734 734 transaction abort!
735 735 rollback completed
736 abort: HTTP request error (incomplete response; expected 459 bytes got 7)
736 abort: HTTP request error (incomplete response; expected 466 bytes got 7)
737 737 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
738 738 [255]
739 739
@@ -799,7 +799,7 b' Server stops sending after 0 length payl'
799 799 added 1 changesets with 1 changes to 1 files
800 800 transaction abort!
801 801 rollback completed
802 abort: HTTP request error (incomplete response; expected 23 bytes got 9)
802 abort: HTTP request error (incomplete response; expected 32 bytes got 9)
803 803 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
804 804 [255]
805 805
General Comments 0
You need to be logged in to leave comments. Login now