mercurial/httppeer.py
changeset 50663 60f9602b413e
parent 50579 b23b3ef38ba1
child 50925 d718eddf01d9
child 50987 758e40b9a8af
--- a/mercurial/httppeer.py	Wed May 31 18:08:56 2023 +0100
+++ b/mercurial/httppeer.py	Wed Mar 08 14:23:43 2023 +0100
@@ -441,6 +441,13 @@
     def capabilities(self):
         return self._caps
 
+    def _finish_inline_clone_bundle(self, stream):
+        # HTTP streams must hit the end to process the last empty
+        # chunk of Chunked-Encoding so the connection can be reused.
+        chunk = stream.read(1)
+        if chunk:
+            self._abort(error.ResponseError(_(b"unexpected response:"), chunk))
+
     # End of ipeercommands interface.
 
     def _callstream(self, cmd, _compressible=False, **args):