Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG4f0aca2b8c21: tests: add optional setsockopt() lines for Python 3
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
pulkit |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
HTTP v2 protocol not enabled by default | HTTP v2 protocol not enabled by default | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest GET api/$HTTPV2 | > httprequest GET api/$HTTPV2 | ||||
> user-agent: test | > user-agent: test | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> GET /api/exp-http-v2-0003 HTTP/1.1\r\n | s> GET /api/exp-http-v2-0003 HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 404 Not Found\r\n | s> HTTP/1.1 404 Not Found\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
Request to unknown command yields 404 | Request to unknown command yields 404 | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/ro/badcommand | > httprequest POST api/$HTTPV2/ro/badcommand | ||||
> user-agent: test | > user-agent: test | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/badcommand HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/badcommand HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 404 Not Found\r\n | s> HTTP/1.1 404 Not Found\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
s> Date: $HTTP_DATE$\r\n | s> Date: $HTTP_DATE$\r\n | ||||
s> Content-Type: text/plain\r\n | s> Content-Type: text/plain\r\n | ||||
s> Content-Length: 42\r\n | s> Content-Length: 42\r\n | ||||
s> \r\n | s> \r\n | ||||
s> unknown wire protocol command: badcommand\n | s> unknown wire protocol command: badcommand\n | ||||
GET to read-only command yields a 405 | GET to read-only command yields a 405 | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest GET api/$HTTPV2/ro/customreadonly | > httprequest GET api/$HTTPV2/ro/customreadonly | ||||
> user-agent: test | > user-agent: test | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> GET /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | s> GET /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 405 Method Not Allowed\r\n | s> HTTP/1.1 405 Method Not Allowed\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
s> Date: $HTTP_DATE$\r\n | s> Date: $HTTP_DATE$\r\n | ||||
s> Allow: POST\r\n | s> Allow: POST\r\n | ||||
s> Content-Length: 30\r\n | s> Content-Length: 30\r\n | ||||
s> \r\n | s> \r\n | ||||
s> commands require POST requests | s> commands require POST requests | ||||
Missing Accept header results in 406 | Missing Accept header results in 406 | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/ro/customreadonly | > httprequest POST api/$HTTPV2/ro/customreadonly | ||||
> user-agent: test | > user-agent: test | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 406 Not Acceptable\r\n | s> HTTP/1.1 406 Not Acceptable\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
s> Date: $HTTP_DATE$\r\n | s> Date: $HTTP_DATE$\r\n | ||||
s> Content-Type: text/plain\r\n | s> Content-Type: text/plain\r\n | ||||
s> Content-Length: 85\r\n | s> Content-Length: 85\r\n | ||||
s> \r\n | s> \r\n | ||||
s> client MUST specify Accept header with value: application/mercurial-exp-framing-0006\n | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0006\n | ||||
Bad Accept header results in 406 | Bad Accept header results in 406 | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/ro/customreadonly | > httprequest POST api/$HTTPV2/ro/customreadonly | ||||
> accept: invalid | > accept: invalid | ||||
> user-agent: test | > user-agent: test | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: invalid\r\n | s> accept: invalid\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 406 Not Acceptable\r\n | s> HTTP/1.1 406 Not Acceptable\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
s> Date: $HTTP_DATE$\r\n | s> Date: $HTTP_DATE$\r\n | ||||
s> Content-Type: text/plain\r\n | s> Content-Type: text/plain\r\n | ||||
s> Content-Length: 85\r\n | s> Content-Length: 85\r\n | ||||
s> \r\n | s> \r\n | ||||
s> client MUST specify Accept header with value: application/mercurial-exp-framing-0006\n | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0006\n | ||||
Bad Content-Type header results in 415 | Bad Content-Type header results in 415 | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/ro/customreadonly | > httprequest POST api/$HTTPV2/ro/customreadonly | ||||
> accept: $MEDIATYPE | > accept: $MEDIATYPE | ||||
> user-agent: test | > user-agent: test | ||||
> content-type: badmedia | > content-type: badmedia | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> content-type: badmedia\r\n | s> content-type: badmedia\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/ro/customreadonly | > httprequest POST api/$HTTPV2/ro/customreadonly | ||||
> accept: $MEDIATYPE | > accept: $MEDIATYPE | ||||
> content-type: $MEDIATYPE | > content-type: $MEDIATYPE | ||||
> user-agent: test | > user-agent: test | ||||
> frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> *\r\n (glob) | s> *\r\n (glob) | ||||
s> content-type: application/mercurial-exp-framing-0006\r\n | s> content-type: application/mercurial-exp-framing-0006\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> content-length: 29\r\n | s> content-length: 29\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> 0\r\n | s> 0\r\n | ||||
s> \r\n | s> \r\n | ||||
$ sendhttpv2peerverbose << EOF | $ sendhttpv2peerverbose << EOF | ||||
> command customreadonly | > command customreadonly | ||||
> EOF | > EOF | ||||
creating http peer for wire protocol version 2 | creating http peer for wire protocol version 2 | ||||
sending customreadonly command | sending customreadonly command | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> content-type: application/mercurial-exp-framing-0006\r\n | s> content-type: application/mercurial-exp-framing-0006\r\n | ||||
s> content-length: 65\r\n | s> content-length: 65\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> user-agent: Mercurial debugwireproto\r\n | s> user-agent: Mercurial debugwireproto\r\n | ||||
s> \r\n | s> \r\n | ||||
GET to read-write request yields 405 | GET to read-write request yields 405 | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest GET api/$HTTPV2/rw/customreadonly | > httprequest GET api/$HTTPV2/rw/customreadonly | ||||
> user-agent: test | > user-agent: test | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> GET /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | s> GET /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 405 Method Not Allowed\r\n | s> HTTP/1.1 405 Method Not Allowed\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
s> Date: $HTTP_DATE$\r\n | s> Date: $HTTP_DATE$\r\n | ||||
s> Allow: POST\r\n | s> Allow: POST\r\n | ||||
s> Content-Length: 30\r\n | s> Content-Length: 30\r\n | ||||
s> \r\n | s> \r\n | ||||
s> commands require POST requests | s> commands require POST requests | ||||
Even for unknown commands | Even for unknown commands | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest GET api/$HTTPV2/rw/badcommand | > httprequest GET api/$HTTPV2/rw/badcommand | ||||
> user-agent: test | > user-agent: test | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> GET /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n | s> GET /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 405 Method Not Allowed\r\n | s> HTTP/1.1 405 Method Not Allowed\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
s> Date: $HTTP_DATE$\r\n | s> Date: $HTTP_DATE$\r\n | ||||
s> Allow: POST\r\n | s> Allow: POST\r\n | ||||
s> Content-Length: 30\r\n | s> Content-Length: 30\r\n | ||||
s> \r\n | s> \r\n | ||||
s> commands require POST requests | s> commands require POST requests | ||||
SSL required by default | SSL required by default | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/rw/customreadonly | > httprequest POST api/$HTTPV2/rw/customreadonly | ||||
> user-agent: test | > user-agent: test | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 403 ssl required\r\n | s> HTTP/1.1 403 ssl required\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/rw/customreadonly | > httprequest POST api/$HTTPV2/rw/customreadonly | ||||
> user-agent: test | > user-agent: test | ||||
> accept: $MEDIATYPE | > accept: $MEDIATYPE | ||||
> content-type: $MEDIATYPE | > content-type: $MEDIATYPE | ||||
> frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> content-type: application/mercurial-exp-framing-0006\r\n | s> content-type: application/mercurial-exp-framing-0006\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> content-length: 29\r\n | s> content-length: 29\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
Authorized request for unknown command is rejected | Authorized request for unknown command is rejected | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/rw/badcommand | > httprequest POST api/$HTTPV2/rw/badcommand | ||||
> user-agent: test | > user-agent: test | ||||
> accept: $MEDIATYPE | > accept: $MEDIATYPE | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 404 Not Found\r\n | s> HTTP/1.1 404 Not Found\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
s> Date: $HTTP_DATE$\r\n | s> Date: $HTTP_DATE$\r\n | ||||
s> Content-Type: text/plain\r\n | s> Content-Type: text/plain\r\n | ||||
s> Content-Length: 42\r\n | s> Content-Length: 42\r\n | ||||
s> \r\n | s> \r\n | ||||
s> unknown wire protocol command: badcommand\n | s> unknown wire protocol command: badcommand\n | ||||
debugreflect isn't enabled by default | debugreflect isn't enabled by default | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/ro/debugreflect | > httprequest POST api/$HTTPV2/ro/debugreflect | ||||
> user-agent: test | > user-agent: test | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
s> makefile('rb', None) | s> makefile('rb', None) | ||||
s> HTTP/1.1 404 Not Found\r\n | s> HTTP/1.1 404 Not Found\r\n | ||||
s> Server: testing stub value\r\n | s> Server: testing stub value\r\n | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/ro/debugreflect | > httprequest POST api/$HTTPV2/ro/debugreflect | ||||
> accept: $MEDIATYPE | > accept: $MEDIATYPE | ||||
> content-type: $MEDIATYPE | > content-type: $MEDIATYPE | ||||
> user-agent: test | > user-agent: test | ||||
> frame 1 1 stream-begin command-request new cbor:{b'name': b'command1', b'args': {b'foo': b'val1', b'bar1': b'val'}} | > frame 1 1 stream-begin command-request new cbor:{b'name': b'command1', b'args': {b'foo': b'val1', b'bar1': b'val'}} | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> content-type: application/mercurial-exp-framing-0006\r\n | s> content-type: application/mercurial-exp-framing-0006\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> content-length: 47\r\n | s> content-length: 47\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/ro/customreadonly | > httprequest POST api/$HTTPV2/ro/customreadonly | ||||
> accept: $MEDIATYPE | > accept: $MEDIATYPE | ||||
> content-type: $MEDIATYPE | > content-type: $MEDIATYPE | ||||
> user-agent: test | > user-agent: test | ||||
> frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> content-type: application/mercurial-exp-framing-0006\r\n | s> content-type: application/mercurial-exp-framing-0006\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> content-length: 29\r\n | s> content-length: 29\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
> httprequest POST api/$HTTPV2/ro/multirequest | > httprequest POST api/$HTTPV2/ro/multirequest | ||||
> accept: $MEDIATYPE | > accept: $MEDIATYPE | ||||
> content-type: $MEDIATYPE | > content-type: $MEDIATYPE | ||||
> user-agent: test | > user-agent: test | ||||
> frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | ||||
> frame 3 1 0 command-request new cbor:{b'name': b'customreadonly'} | > frame 3 1 0 command-request new cbor:{b'name': b'customreadonly'} | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> *\r\n (glob) | s> *\r\n (glob) | ||||
s> *\r\n (glob) | s> *\r\n (glob) | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> content-length: 58\r\n | s> content-length: 58\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
> content-type: $MEDIATYPE | > content-type: $MEDIATYPE | ||||
> user-agent: test | > user-agent: test | ||||
> frame 1 1 stream-begin command-request new|more \xa2Dargs\xa1Inamespace | > frame 1 1 stream-begin command-request new|more \xa2Dargs\xa1Inamespace | ||||
> frame 3 1 0 command-request new|more \xa2Dargs\xa1Inamespace | > frame 3 1 0 command-request new|more \xa2Dargs\xa1Inamespace | ||||
> frame 3 1 0 command-request continuation JnamespacesDnameHlistkeys | > frame 3 1 0 command-request continuation JnamespacesDnameHlistkeys | ||||
> frame 1 1 0 command-request continuation IbookmarksDnameHlistkeys | > frame 1 1 0 command-request continuation IbookmarksDnameHlistkeys | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> content-type: application/mercurial-exp-framing-0006\r\n | s> content-type: application/mercurial-exp-framing-0006\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> content-length: 115\r\n | s> content-length: 115\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
$ sendhttpraw << EOF | $ sendhttpraw << EOF | ||||
> httprequest POST api/$HTTPV2/ro/multirequest | > httprequest POST api/$HTTPV2/ro/multirequest | ||||
> accept: $MEDIATYPE | > accept: $MEDIATYPE | ||||
> content-type: $MEDIATYPE | > content-type: $MEDIATYPE | ||||
> user-agent: test | > user-agent: test | ||||
> frame 1 1 stream-begin command-request new cbor:{b'name': b'pushkey'} | > frame 1 1 stream-begin command-request new cbor:{b'name': b'pushkey'} | ||||
> EOF | > EOF | ||||
using raw connection to peer | using raw connection to peer | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> content-type: application/mercurial-exp-framing-0006\r\n | s> content-type: application/mercurial-exp-framing-0006\r\n | ||||
s> user-agent: test\r\n | s> user-agent: test\r\n | ||||
s> content-length: 22\r\n | s> content-length: 22\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> \r\n | s> \r\n | ||||
Defining an invalid content encoding results in warning | Defining an invalid content encoding results in warning | ||||
$ hg --config experimental.httppeer.v2-encoder-order=identity,badencoder --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF | $ hg --config experimental.httppeer.v2-encoder-order=identity,badencoder --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF | ||||
> command heads | > command heads | ||||
> EOF | > EOF | ||||
creating http peer for wire protocol version 2 | creating http peer for wire protocol version 2 | ||||
sending heads command | sending heads command | ||||
wire protocol version 2 encoder referenced in config (badencoder) is not known; ignoring | wire protocol version 2 encoder referenced in config (badencoder) is not known; ignoring | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> content-type: application/mercurial-exp-framing-0006\r\n | s> content-type: application/mercurial-exp-framing-0006\r\n | ||||
s> content-length: 56\r\n | s> content-length: 56\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> user-agent: Mercurial debugwireproto\r\n | s> user-agent: Mercurial debugwireproto\r\n | ||||
s> \r\n | s> \r\n | ||||
#if zstd | #if zstd | ||||
$ hg --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF | $ hg --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF | ||||
> command heads | > command heads | ||||
> EOF | > EOF | ||||
creating http peer for wire protocol version 2 | creating http peer for wire protocol version 2 | ||||
sending heads command | sending heads command | ||||
s> setsockopt(6, 1, 1) -> None (py3 !) | |||||
s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n | s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n | ||||
s> Accept-Encoding: identity\r\n | s> Accept-Encoding: identity\r\n | ||||
s> accept: application/mercurial-exp-framing-0006\r\n | s> accept: application/mercurial-exp-framing-0006\r\n | ||||
s> content-type: application/mercurial-exp-framing-0006\r\n | s> content-type: application/mercurial-exp-framing-0006\r\n | ||||
s> content-length: 70\r\n | s> content-length: 70\r\n | ||||
s> host: $LOCALIP:$HGPORT\r\n (glob) | s> host: $LOCALIP:$HGPORT\r\n (glob) | ||||
s> user-agent: Mercurial debugwireproto\r\n | s> user-agent: Mercurial debugwireproto\r\n | ||||
s> \r\n | s> \r\n |