##// END OF EJS Templates
wireprotoserver: rename hgweb.protocol to wireprotoserver (API)...
Gregory Szorc -
r35874:ef3a24a0 default
parent child Browse files
Show More
@@ -36,10 +36,10 b' from .. import ('
36 36 templater,
37 37 ui as uimod,
38 38 util,
39 wireprotoserver,
39 40 )
40 41
41 42 from . import (
42 protocol,
43 43 webcommands,
44 44 webutil,
45 45 wsgicgi,
@@ -362,13 +362,13 b' class hgweb(object):'
362 362 # and the clients always use the old URL structure
363 363
364 364 cmd = pycompat.sysbytes(req.form.get(r'cmd', [r''])[0])
365 if protocol.iscmd(cmd):
365 if wireprotoserver.iscmd(cmd):
366 366 try:
367 367 if query:
368 368 raise ErrorResponse(HTTP_NOT_FOUND)
369 369 if cmd in perms:
370 370 self.check_perm(rctx, req, perms[cmd])
371 return protocol.call(rctx.repo, req, cmd)
371 return wireprotoserver.call(rctx.repo, req, cmd)
372 372 except ErrorResponse as inst:
373 373 # A client that sends unbundle without 100-continue will
374 374 # break if we respond early.
@@ -379,7 +379,7 b' class hgweb(object):'
379 379 req.drain()
380 380 else:
381 381 req.headers.append((r'Connection', r'Close'))
382 req.respond(inst, protocol.HGTYPE,
382 req.respond(inst, wireprotoserver.HGTYPE,
383 383 body='0\n%s\n' % inst)
384 384 return ''
385 385
@@ -1,4 +1,3 b''
1 #
2 1 # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
3 2 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
4 3 #
@@ -10,16 +9,16 b' from __future__ import absolute_import'
10 9 import cgi
11 10 import struct
12 11
13 from .common import (
12 from .hgweb.common import (
14 13 HTTP_OK,
15 14 )
16
17 from .. import (
15 from . import (
18 16 error,
19 17 pycompat,
20 18 util,
21 19 wireproto,
22 20 )
21
23 22 stringio = util.stringio
24 23
25 24 urlerr = util.urlerr
General Comments 0
You need to be logged in to leave comments. Login now