Mercurial > hg-stable
changeset 34722:95be8928d6b2
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
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 14 Oct 2017 11:20:31 -0400 |
parents | baee5512f262 |
children | b13c95919ff5 |
files | mercurial/hgweb/request.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/request.py Sat Oct 14 10:47:29 2017 -0400 +++ b/mercurial/hgweb/request.py Sat Oct 14 11:20:31 2017 -0400 @@ -93,14 +93,14 @@ 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):