equal
deleted
inserted
replaced
367 if query: |
367 if query: |
368 raise ErrorResponse(HTTP_NOT_FOUND) |
368 raise ErrorResponse(HTTP_NOT_FOUND) |
369 if cmd in perms: |
369 if cmd in perms: |
370 self.check_perm(rctx, req, perms[cmd]) |
370 self.check_perm(rctx, req, perms[cmd]) |
371 except ErrorResponse as inst: |
371 except ErrorResponse as inst: |
372 # A client that sends unbundle without 100-continue will |
372 return protohandler['handleerror'](inst) |
373 # break if we respond early. |
|
374 if (cmd == 'unbundle' and |
|
375 (req.env.get('HTTP_EXPECT', |
|
376 '').lower() != '100-continue') or |
|
377 req.env.get('X-HgHttp2', '')): |
|
378 req.drain() |
|
379 else: |
|
380 req.headers.append((r'Connection', r'Close')) |
|
381 req.respond(inst, wireprotoserver.HGTYPE, |
|
382 body='0\n%s\n' % inst) |
|
383 return '' |
|
384 |
373 |
385 return protohandler['dispatch']() |
374 return protohandler['dispatch']() |
386 |
375 |
387 # translate user-visible url structure to internal structure |
376 # translate user-visible url structure to internal structure |
388 |
377 |