--- a/mercurial/wireprotoserver.py Tue Mar 13 19:44:59 2018 -0700
+++ b/mercurial/wireprotoserver.py Mon Mar 19 16:49:53 2018 -0700
@@ -32,7 +32,7 @@
HGTYPE = 'application/mercurial-0.1'
HGTYPE2 = 'application/mercurial-0.2'
HGERRTYPE = 'application/hg-error'
-HTTPV2TYPE = 'application/mercurial-tbd'
+FRAMINGTYPE = b'application/mercurial-exp-framing-0001'
HTTPV2 = wireprototypes.HTTPV2
SSHV1 = wireprototypes.SSHV1
@@ -336,21 +336,21 @@
res.setbodybytes(_('invalid wire protocol command: %s') % command)
return
- if req.headers.get(b'Accept') != HTTPV2TYPE:
+ if req.headers.get(b'Accept') != FRAMINGTYPE:
res.status = b'406 Not Acceptable'
res.headers[b'Content-Type'] = b'text/plain'
res.setbodybytes(_('client MUST specify Accept header with value: %s\n')
- % HTTPV2TYPE)
+ % FRAMINGTYPE)
return
if (b'Content-Type' in req.headers
- and req.headers[b'Content-Type'] != HTTPV2TYPE):
+ and req.headers[b'Content-Type'] != FRAMINGTYPE):
res.status = b'415 Unsupported Media Type'
# TODO we should send a response with appropriate media type,
# since client does Accept it.
res.headers[b'Content-Type'] = b'text/plain'
res.setbodybytes(_('client MUST send Content-Type header with '
- 'value: %s\n') % HTTPV2TYPE)
+ 'value: %s\n') % FRAMINGTYPE)
return
# We don't do anything meaningful yet.