mercurial/wireprotoserver.py
changeset 36713 2442927cdd96
parent 36613 6e585bca962e
child 36760 7bf80d9d9543
equal deleted inserted replaced
36712:e79adc12cde3 36713:2442927cdd96
   157     ``req`` is a ``wsgirequest`` instance.
   157     ``req`` is a ``wsgirequest`` instance.
   158     """
   158     """
   159     # HTTP version 1 wire protocol requests are denoted by a "cmd" query
   159     # HTTP version 1 wire protocol requests are denoted by a "cmd" query
   160     # string parameter. If it isn't present, this isn't a wire protocol
   160     # string parameter. If it isn't present, this isn't a wire protocol
   161     # request.
   161     # request.
   162     if r'cmd' not in req.form:
   162     if 'cmd' not in req.form:
   163         return None
   163         return None
   164 
   164 
   165     cmd = pycompat.sysbytes(req.form[r'cmd'][0])
   165     cmd = req.form['cmd'][0]
   166 
   166 
   167     # The "cmd" request parameter is used by both the wire protocol and hgweb.
   167     # The "cmd" request parameter is used by both the wire protocol and hgweb.
   168     # While not all wire protocol commands are available for all transports,
   168     # While not all wire protocol commands are available for all transports,
   169     # if we see a "cmd" value that resembles a known wire protocol command, we
   169     # if we see a "cmd" value that resembles a known wire protocol command, we
   170     # route it to a protocol handler. This is better than routing possible
   170     # route it to a protocol handler. This is better than routing possible