##// 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 except httplib.IncompleteRead as e:
84 except httplib.IncompleteRead as e:
85 # e.expected is an integer if length known or None otherwise.
85 # e.expected is an integer if length known or None otherwise.
86 if e.expected:
86 if e.expected:
87 got = len(e.partial)
88 total = e.expected + got
87 msg = _('HTTP request error (incomplete response; '
89 msg = _('HTTP request error (incomplete response; '
88 'expected %d bytes got %d)') % (e.expected,
90 'expected %d bytes got %d)') % (total, got)
89 len(e.partial))
90 else:
91 else:
91 msg = _('HTTP request error (incomplete response)')
92 msg = _('HTTP request error (incomplete response)')
92
93
@@ -275,7 +275,7 b' Server sends an incomplete capabilities '
275 $ cat hg.pid > $DAEMON_PIDS
275 $ cat hg.pid > $DAEMON_PIDS
276
276
277 $ hg clone http://localhost:$HGPORT/ clone
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 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
279 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
280 [255]
280 [255]
281
281
@@ -600,7 +600,7 b' Server sends partial bundle2 header magi'
600
600
601 $ hg clone http://localhost:$HGPORT/ clone
601 $ hg clone http://localhost:$HGPORT/ clone
602 requesting all changes
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 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
604 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
605 [255]
605 [255]
606
606
@@ -624,7 +624,7 b' Server sends incomplete bundle2 stream p'
624
624
625 $ hg clone http://localhost:$HGPORT/ clone
625 $ hg clone http://localhost:$HGPORT/ clone
626 requesting all changes
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 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
628 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
629 [255]
629 [255]
630
630
@@ -733,7 +733,7 b' Server stops after bundle2 part payload '
733 adding changesets
733 adding changesets
734 transaction abort!
734 transaction abort!
735 rollback completed
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 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
737 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
738 [255]
738 [255]
739
739
@@ -799,7 +799,7 b' Server stops sending after 0 length payl'
799 added 1 changesets with 1 changes to 1 files
799 added 1 changesets with 1 changes to 1 files
800 transaction abort!
800 transaction abort!
801 rollback completed
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 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
803 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
804 [255]
804 [255]
805
805
General Comments 0
You need to be logged in to leave comments. Login now