Show More
@@ -711,6 +711,8 b' size of the data that follows:' | |||||
711 | * 0 or more UTF-8 strings that will be used as arguments to the |
|
711 | * 0 or more UTF-8 strings that will be used as arguments to the | |
712 | formatting string. |
|
712 | formatting string. | |
713 |
|
713 | |||
|
714 | TODO use ASCII for formatting string. | |||
|
715 | ||||
714 | All data to be printed MUST be encoded into a single frame: this frame |
|
716 | All data to be printed MUST be encoded into a single frame: this frame | |
715 | does not support spanning data across multiple frames. |
|
717 | does not support spanning data across multiple frames. | |
716 |
|
718 |
@@ -353,6 +353,7 b' def _handlehttpv2request(rctx, req, res,' | |||||
353 | res.setbodybytes(_('invalid wire protocol command: %s') % command) |
|
353 | res.setbodybytes(_('invalid wire protocol command: %s') % command) | |
354 | return |
|
354 | return | |
355 |
|
355 | |||
|
356 | # TODO consider cases where proxies may add additional Accept headers. | |||
356 | if req.headers.get(b'Accept') != FRAMINGTYPE: |
|
357 | if req.headers.get(b'Accept') != FRAMINGTYPE: | |
357 | res.status = b'406 Not Acceptable' |
|
358 | res.status = b'406 Not Acceptable' | |
358 | res.headers[b'Content-Type'] = b'text/plain' |
|
359 | res.headers[b'Content-Type'] = b'text/plain' | |
@@ -507,6 +508,7 b' def _httpv2runcommand(ui, repo, req, res' | |||||
507 | command['command']) |
|
508 | command['command']) | |
508 | return True |
|
509 | return True | |
509 |
|
510 | |||
|
511 | # TODO don't use assert here, since it may be elided by -O. | |||
510 | assert authedperm in (b'ro', b'rw') |
|
512 | assert authedperm in (b'ro', b'rw') | |
511 | wirecommand = wireproto.commands[command['command']] |
|
513 | wirecommand = wireproto.commands[command['command']] | |
512 | assert wirecommand.permission in ('push', 'pull') |
|
514 | assert wirecommand.permission in ('push', 'pull') | |
@@ -556,7 +558,7 b' def _httpv2runcommand(ui, repo, req, res' | |||||
556 | res.setbodygen(meta['framegen']) |
|
558 | res.setbodygen(meta['framegen']) | |
557 | return True |
|
559 | return True | |
558 | elif action == 'noop': |
|
560 | elif action == 'noop': | |
559 |
|
|
561 | return False | |
560 | else: |
|
562 | else: | |
561 | raise error.ProgrammingError('unhandled event from reactor: %s' % |
|
563 | raise error.ProgrammingError('unhandled event from reactor: %s' % | |
562 | action) |
|
564 | action) |
General Comments 0
You need to be logged in to leave comments.
Login now