[PATCH] httppeer: make sure we limit argument for older server not supporting batch

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Apr 23 22:37:30 UTC 2019


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1556049342 -7200
#      Tue Apr 23 21:55:42 2019 +0200
# Node ID 26f277f0f415206036a57f17400284107816f00d
# Parent  84bd6ae2d1f656dff1d494a03558c4edb58ebd31
# EXP-Topic discovery-followup
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 26f277f0f415
httppeer: make sure we limit argument for older server not supporting batch

Most commands will still have some argument restriction when using 'GET' method
instead of batching through POST.

diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -382,7 +382,9 @@ class httppeer(wireprotov1peer.wirepeer)
         self._path = path
         self._url = url
         self._caps = caps
-        self.limitedarguments = caps is not None and 'httppostargs' not in caps
+        self.limitedarguments = False
+        if caps is None or 'batch' not in caps or 'httppostargs' not in caps:
+            self.limitedarguments = True
         self._urlopener = opener
         self._requestbuilder = requestbuilder
 


More information about the Mercurial-devel mailing list