[PATCH 2 of 2 STABLE] httprepo: use content-type application/mercurial-0.1 for POST

Sune Foldager cryo at cyanite.org
Mon Feb 22 09:34:01 CST 2010


# HG changeset patch
# User Sune Foldager <cryo at cyanite.org>
# Date 1266852537 -3600
# Branch stable
# Node ID 9399552a8c97f3386e2265882ee7d7f4f054669d
# Parent  63a858b81dd2c5fc7d5f60ac16349f7e1d2ad3aa
httprepo: use content-type application/mercurial-0.1 for POST

Previously, application/octet-stream was used. The content-type is
currently ignored by the server.

diff --git a/mercurial/httprepo.py b/mercurial/httprepo.py
--- a/mercurial/httprepo.py
+++ b/mercurial/httprepo.py
@@ -231,7 +231,7 @@
             try:
                 resp = self.do_read(
                      'unbundle', data=fp,
-                     headers={'Content-Type': 'application/octet-stream'},
+                     headers={'content-type': 'application/mercurial-0.1'},
                      heads=' '.join(map(hex, heads)))
                 resp_code, output = resp.split('\n', 1)
                 try:


More information about the Mercurial-devel mailing list