# HG changeset patch # User Augie Fackler # Date 2017-10-14 15:20:31 # Node ID 95be8928d6b28ec0edfc27bed2d5f05bd3f06c55 # Parent baee5512f2623229dff5419464b1f493cf839aef hgweb: fill in content-type and content-length as native strings This lets me actually get a capabilities response from hgweb over http. Differential Revision: https://phab.mercurial-scm.org/D1087 diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py --- a/mercurial/hgweb/request.py +++ b/mercurial/hgweb/request.py @@ -93,14 +93,14 @@ class wsgirequest(object): if not isinstance(type, str): type = pycompat.sysstr(type) if self._start_response is not None: - self.headers.append(('Content-Type', type)) + self.headers.append((r'Content-Type', type)) if filename: filename = (filename.rpartition('/')[-1] .replace('\\', '\\\\').replace('"', '\\"')) self.headers.append(('Content-Disposition', 'inline; filename="%s"' % filename)) if body is not None: - self.headers.append(('Content-Length', str(len(body)))) + self.headers.append((r'Content-Length', str(len(body)))) for k, v in self.headers: if not isinstance(v, str):