tests/test-http-api-httpv2.t
changeset 37288 9bfcbe4f4745
parent 37059 bbea991635d0
child 37289 5fadc63ac99f
--- a/tests/test-http-api-httpv2.t	Mon Mar 26 13:57:22 2018 -0700
+++ b/tests/test-http-api-httpv2.t	Mon Mar 26 11:00:16 2018 -0700
@@ -179,7 +179,7 @@
   >     accept: $MEDIATYPE
   >     content-type: $MEDIATYPE
   >     user-agent: test
-  >     frame 1 command-name eos customreadonly
+  >     frame 1 1 stream-begin command-name eos customreadonly
   > EOF
   using raw connection to peer
   s>     POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n
@@ -190,7 +190,7 @@
   s>     *\r\n (glob)
   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   s>     \r\n
-  s>     \x0e\x00\x00\x01\x00\x11customreadonly
+  s>     \x0e\x00\x00\x01\x00\x01\x01\x11customreadonly
   s> makefile('rb', None)
   s>     HTTP/1.1 200 OK\r\n
   s>     Server: testing stub value\r\n
@@ -198,8 +198,8 @@
   s>     Content-Type: application/mercurial-exp-framing-0002\r\n
   s>     Transfer-Encoding: chunked\r\n
   s>     \r\n
-  s>     23\r\n
-  s>     \x1d\x00\x00\x01\x00Bcustomreadonly bytes response
+  s>     25\r\n
+  s>     \x1d\x00\x00\x01\x00\x02\x01Bcustomreadonly bytes response
   s>     \r\n
   s>     0\r\n
   s>     \r\n
@@ -290,7 +290,7 @@
   >     user-agent: test
   >     accept: $MEDIATYPE
   >     content-type: $MEDIATYPE
-  >     frame 1 command-name eos customreadonly
+  >     frame 1 1 stream-begin command-name eos customreadonly
   > EOF
   using raw connection to peer
   s>     POST /api/exp-http-v2-0001/rw/customreadonly HTTP/1.1\r\n
@@ -298,10 +298,10 @@
   s>     accept: application/mercurial-exp-framing-0002\r\n
   s>     content-type: application/mercurial-exp-framing-0002\r\n
   s>     user-agent: test\r\n
-  s>     content-length: 20\r\n
+  s>     content-length: 22\r\n
   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   s>     \r\n
-  s>     \x0e\x00\x00\x01\x00\x11customreadonly
+  s>     \x0e\x00\x00\x01\x00\x01\x01\x11customreadonly
   s> makefile('rb', None)
   s>     HTTP/1.1 200 OK\r\n
   s>     Server: testing stub value\r\n
@@ -309,8 +309,8 @@
   s>     Content-Type: application/mercurial-exp-framing-0002\r\n
   s>     Transfer-Encoding: chunked\r\n
   s>     \r\n
-  s>     23\r\n
-  s>     \x1d\x00\x00\x01\x00Bcustomreadonly bytes response
+  s>     25\r\n
+  s>     \x1d\x00\x00\x01\x00\x02\x01Bcustomreadonly bytes response
   s>     \r\n
   s>     0\r\n
   s>     \r\n
@@ -382,9 +382,9 @@
   >     accept: $MEDIATYPE
   >     content-type: $MEDIATYPE
   >     user-agent: test
-  >     frame 1 command-name have-args command1
-  >     frame 1 command-argument 0 \x03\x00\x04\x00fooval1
-  >     frame 1 command-argument eoa \x04\x00\x03\x00bar1val
+  >     frame 1 1 stream-begin command-name have-args command1
+  >     frame 1 1 0 command-argument 0 \x03\x00\x04\x00fooval1
+  >     frame 1 1 0 command-argument eoa \x04\x00\x03\x00bar1val
   > EOF
   using raw connection to peer
   s>     POST /api/exp-http-v2-0001/ro/debugreflect HTTP/1.1\r\n
@@ -392,10 +392,10 @@
   s>     accept: application/mercurial-exp-framing-0002\r\n
   s>     content-type: application/mercurial-exp-framing-0002\r\n
   s>     user-agent: test\r\n
-  s>     content-length: 48\r\n
+  s>     content-length: 54\r\n
   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   s>     \r\n
-  s>     \x08\x00\x00\x01\x00\x12command1\x0b\x00\x00\x01\x00 \x03\x00\x04\x00fooval1\x0b\x00\x00\x01\x00"\x04\x00\x03\x00bar1val
+  s>     \x08\x00\x00\x01\x00\x01\x01\x12command1\x0b\x00\x00\x01\x00\x01\x00 \x03\x00\x04\x00fooval1\x0b\x00\x00\x01\x00\x01\x00"\x04\x00\x03\x00bar1val
   s> makefile('rb', None)
   s>     HTTP/1.1 200 OK\r\n
   s>     Server: testing stub value\r\n
@@ -419,8 +419,8 @@
   >     accept: $MEDIATYPE
   >     content-type: $MEDIATYPE
   >     user-agent: test
-  >     frame 1 command-name eos customreadonly
-  >     frame 3 command-name eos customreadonly
+  >     frame 1 1 stream-begin command-name eos customreadonly
+  >     frame 3 1 0 command-name eos customreadonly
   > EOF
   using raw connection to peer
   s>     POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n
@@ -428,10 +428,10 @@
   s>     accept: application/mercurial-exp-framing-0002\r\n
   s>     content-type: application/mercurial-exp-framing-0002\r\n
   s>     user-agent: test\r\n
-  s>     content-length: 40\r\n
+  s>     content-length: 44\r\n
   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   s>     \r\n
-  s>     \x0e\x00\x00\x01\x00\x11customreadonly\x0e\x00\x00\x03\x00\x11customreadonly
+  s>     \x0e\x00\x00\x01\x00\x01\x01\x11customreadonly\x0e\x00\x00\x03\x00\x01\x00\x11customreadonly
   s> makefile('rb', None)
   s>     HTTP/1.1 200 OK\r\n
   s>     Server: testing stub value\r\n
@@ -448,8 +448,8 @@
   >     accept: $MEDIATYPE
   >     content-type: $MEDIATYPE
   >     user-agent: test
-  >     frame 1 command-name eos customreadonly
-  >     frame 3 command-name eos customreadonly
+  >     frame 1 1 stream-begin command-name eos customreadonly
+  >     frame 3 1 0 command-name eos customreadonly
   > EOF
   using raw connection to peer
   s>     POST /api/exp-http-v2-0001/ro/multirequest HTTP/1.1\r\n
@@ -460,7 +460,7 @@
   s>     *\r\n (glob)
   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   s>     \r\n
-  s>     \x0e\x00\x00\x01\x00\x11customreadonly\x0e\x00\x00\x03\x00\x11customreadonly
+  s>     \x0e\x00\x00\x01\x00\x01\x01\x11customreadonly\x0e\x00\x00\x03\x00\x01\x00\x11customreadonly
   s> makefile('rb', None)
   s>     HTTP/1.1 200 OK\r\n
   s>     Server: testing stub value\r\n
@@ -469,10 +469,10 @@
   s>     Transfer-Encoding: chunked\r\n
   s>     \r\n
   s>     *\r\n (glob)
-  s>     \x1d\x00\x00\x01\x00Bcustomreadonly bytes response
+  s>     \x1d\x00\x00\x01\x00\x02\x01Bcustomreadonly bytes response
   s>     \r\n
-  s>     23\r\n
-  s>     \x1d\x00\x00\x03\x00Bcustomreadonly bytes response
+  s>     25\r\n
+  s>     \x1d\x00\x00\x03\x00\x02\x01Bcustomreadonly bytes response
   s>     \r\n
   s>     0\r\n
   s>     \r\n
@@ -484,10 +484,10 @@
   >     accept: $MEDIATYPE
   >     content-type: $MEDIATYPE
   >     user-agent: test
-  >     frame 1 command-name have-args listkeys
-  >     frame 3 command-name have-args listkeys
-  >     frame 3 command-argument eoa \x09\x00\x09\x00namespacebookmarks
-  >     frame 1 command-argument eoa \x09\x00\x0a\x00namespacenamespaces
+  >     frame 1 1 stream-begin command-name have-args listkeys
+  >     frame 3 1 0 command-name have-args listkeys
+  >     frame 3 1 0 command-argument eoa \x09\x00\x09\x00namespacebookmarks
+  >     frame 1 1 0 command-argument eoa \x09\x00\x0a\x00namespacenamespaces
   > EOF
   using raw connection to peer
   s>     POST /api/exp-http-v2-0001/ro/multirequest HTTP/1.1\r\n
@@ -495,10 +495,10 @@
   s>     accept: application/mercurial-exp-framing-0002\r\n
   s>     content-type: application/mercurial-exp-framing-0002\r\n
   s>     user-agent: test\r\n
-  s>     content-length: 85\r\n
+  s>     content-length: 93\r\n
   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   s>     \r\n
-  s>     \x08\x00\x00\x01\x00\x12listkeys\x08\x00\x00\x03\x00\x12listkeys\x16\x00\x00\x03\x00"	\x00	\x00namespacebookmarks\x17\x00\x00\x01\x00"	\x00\n
+  s>     \x08\x00\x00\x01\x00\x01\x01\x12listkeys\x08\x00\x00\x03\x00\x01\x00\x12listkeys\x16\x00\x00\x03\x00\x01\x00"	\x00	\x00namespacebookmarks\x17\x00\x00\x01\x00\x01\x00"	\x00\n
   s>     \x00namespacenamespaces
   s> makefile('rb', None)
   s>     HTTP/1.1 200 OK\r\n
@@ -507,11 +507,11 @@
   s>     Content-Type: application/mercurial-exp-framing-0002\r\n
   s>     Transfer-Encoding: chunked\r\n
   s>     \r\n
-  s>     6\r\n
-  s>     \x00\x00\x00\x03\x00B
+  s>     8\r\n
+  s>     \x00\x00\x00\x03\x00\x02\x01B
   s>     \r\n
-  s>     24\r\n
-  s>     \x1e\x00\x00\x01\x00Bbookmarks	\n
+  s>     26\r\n
+  s>     \x1e\x00\x00\x01\x00\x02\x01Bbookmarks	\n
   s>     namespaces	\n
   s>     phases	
   s>     \r\n
@@ -540,7 +540,7 @@
   >     accept: $MEDIATYPE
   >     content-type: $MEDIATYPE
   >     user-agent: test
-  >     frame 1 command-name eos unbundle
+  >     frame 1 1 stream-begin command-name eos unbundle
   > EOF
   using raw connection to peer
   s>     POST /api/exp-http-v2-0001/ro/multirequest HTTP/1.1\r\n
@@ -548,10 +548,10 @@
   s>     accept: application/mercurial-exp-framing-0002\r\n
   s>     content-type: application/mercurial-exp-framing-0002\r\n
   s>     user-agent: test\r\n
-  s>     content-length: 14\r\n
+  s>     content-length: 16\r\n
   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   s>     \r\n
-  s>     \x08\x00\x00\x01\x00\x11unbundle
+  s>     \x08\x00\x00\x01\x00\x01\x01\x11unbundle
   s> makefile('rb', None)
   s>     HTTP/1.1 403 Forbidden\r\n
   s>     Server: testing stub value\r\n