mercurial/url.py
changeset 30763 a520aefb96f1
parent 30664 69acfd2ca11e
child 30820 6a70cf94d1b5
--- a/mercurial/url.py	Sat Dec 24 15:21:46 2016 -0700
+++ b/mercurial/url.py	Sat Dec 24 15:22:18 2016 -0700
@@ -466,6 +466,11 @@
     # user agent they deem appropriate.
     agent = 'mercurial/proto-1.0 (Mercurial %s)' % util.version()
     opener.addheaders = [('User-agent', agent)]
+
+    # This header should only be needed by wire protocol requests. But it has
+    # been sent on all requests since forever. We keep sending it for backwards
+    # compatibility reasons. Modern versions of the wire protocol use
+    # X-HgProto-<N> for advertising client support.
     opener.addheaders.append(('Accept', 'application/mercurial-0.1'))
     return opener