tests/test-http-bad-server.t
changeset 35259 ad5f2b923b0d
parent 35232 a037b6647d8c
child 35268 44b8b5ad30eb
equal deleted inserted replaced
35258:dbf868623daf 35259:ad5f2b923b0d
   116   readline(4? from -1) -> (2) \r\n (glob)
   116   readline(4? from -1) -> (2) \r\n (glob)
   117   write(36) -> HTTP/1.1 200 Script output follows\r\n
   117   write(36) -> HTTP/1.1 200 Script output follows\r\n
   118   write(23) -> Server: badhttpserver\r\n
   118   write(23) -> Server: badhttpserver\r\n
   119   write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   119   write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   120   write(41) -> Content-Type: application/mercurial-0.1\r\n
   120   write(41) -> Content-Type: application/mercurial-0.1\r\n
   121   write(21) -> Content-Length: 405\r\n
   121   write(21) -> Content-Length: 417\r\n
   122   write(2) -> \r\n
   122   write(2) -> \r\n
   123   write(405) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   123   write(417) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   124   readline(4? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
   124   readline(4? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
   125   readline(1? from -1) -> (1?) Accept-Encoding* (glob)
   125   readline(1? from -1) -> (1?) Accept-Encoding* (glob)
   126   read limit reached; closing socket
   126   read limit reached; closing socket
   127   readline(210 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   127   readline(210 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   128   readline(184 from -1) -> (27) Accept-Encoding: identity\r\n
   128   readline(184 from -1) -> (27) Accept-Encoding: identity\r\n
   155   readline(12? from -1) -> (2) \r\n (glob)
   155   readline(12? from -1) -> (2) \r\n (glob)
   156   write(36) -> HTTP/1.1 200 Script output follows\r\n
   156   write(36) -> HTTP/1.1 200 Script output follows\r\n
   157   write(23) -> Server: badhttpserver\r\n
   157   write(23) -> Server: badhttpserver\r\n
   158   write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   158   write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   159   write(41) -> Content-Type: application/mercurial-0.1\r\n
   159   write(41) -> Content-Type: application/mercurial-0.1\r\n
   160   write(21) -> Content-Length: 405\r\n
   160   readline(1 from -1) -> (1) x (?)
       
   161   write(21) -> Content-Length: 417\r\n
   161   write(2) -> \r\n
   162   write(2) -> \r\n
   162   write(405) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   163   write(417) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   163   readline\(12[34] from 65537\) -> \(2[67]\) GET /\?cmd=batch HTTP/1.1\\r\\n (re)
   164   readline\(12[34] from 65537\) -> \(2[67]\) GET /\?cmd=batch HTTP/1.1\\r\\n (re)
   164   readline(9? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
   165   readline(9? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
   165   readline(7? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
   166   readline(7? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
   166   readline(4? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
   167   readline(4? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
   167   readline(1 from -1) -> (1) x (?)
   168   readline(1 from -1) -> (1) x (?)
   185   readline\(1[23] from 65537\) -> \(1[23]\) GET /\?cmd=ge.? (re)
   186   readline\(1[23] from 65537\) -> \(1[23]\) GET /\?cmd=ge.? (re)
   186   read limit reached; closing socket
   187   read limit reached; closing socket
   187   readline(292 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
   188   readline(292 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
   188   readline(262 from -1) -> (27) Accept-Encoding: identity\r\n
   189   readline(262 from -1) -> (27) Accept-Encoding: identity\r\n
   189   readline(235 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   190   readline(235 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   190   readline(206 from -1) -> (206) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Ali
   191   readline(206 from -1) -> (206) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtag
   191   read limit reached; closing socket
   192   read limit reached; closing socket
   192 
   193 
   193   $ rm -f error.log
   194   $ rm -f error.log
   194 
   195 
   195 Now do a variation using POST to send arguments
   196 Now do a variation using POST to send arguments
   212   readline(14? from -1) -> (2) \r\n (glob)
   213   readline(14? from -1) -> (2) \r\n (glob)
   213   write(36) -> HTTP/1.1 200 Script output follows\r\n
   214   write(36) -> HTTP/1.1 200 Script output follows\r\n
   214   write(23) -> Server: badhttpserver\r\n
   215   write(23) -> Server: badhttpserver\r\n
   215   write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   216   write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   216   write(41) -> Content-Type: application/mercurial-0.1\r\n
   217   write(41) -> Content-Type: application/mercurial-0.1\r\n
   217   write(21) -> Content-Length: 418\r\n
   218   write(21) -> Content-Length: 430\r\n
   218   write(2) -> \r\n
   219   write(2) -> \r\n
   219   write(418) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httppostargs httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   220   write(430) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httppostargs httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   220   readline\(14[67] from 65537\) -> \(2[67]\) POST /\?cmd=batch HTTP/1.1\\r\\n (re)
   221   readline\(14[67] from 65537\) -> \(2[67]\) POST /\?cmd=batch HTTP/1.1\\r\\n (re)
   221   readline\(1(19|20) from -1\) -> \(27\) Accept-Encoding: identity\\r\\n (re)
   222   readline\(1(19|20) from -1\) -> \(27\) Accept-Encoding: identity\\r\\n (re)
   222   readline(9? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob)
   223   readline(9? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob)
   223   readline(5? from -1) -> (19) vary: X-HgProto-1\r\n (glob)
   224   readline(5? from -1) -> (19) vary: X-HgProto-1\r\n (glob)
   224   readline(3? from -1) -> (19) x-hgargs-post: 28\r\n (glob)
   225   readline(3? from -1) -> (19) x-hgargs-post: 28\r\n (glob)
   271 
   272 
   272   $ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
   273   $ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
   273   $ cat hg.pid > $DAEMON_PIDS
   274   $ cat hg.pid > $DAEMON_PIDS
   274 
   275 
   275   $ hg clone http://localhost:$HGPORT/ clone
   276   $ hg clone http://localhost:$HGPORT/ clone
   276   abort: HTTP request error (incomplete response; expected 385 bytes got 20)
   277   abort: HTTP request error (incomplete response; expected 397 bytes got 20)
   277   (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
   278   (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
   278   [255]
   279   [255]
   279 
   280 
   280   $ killdaemons.py $DAEMON_PIDS
   281   $ killdaemons.py $DAEMON_PIDS
   281 
   282 
   288   readline(-1) -> (2) \r\n
   289   readline(-1) -> (2) \r\n
   289   write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n
   290   write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n
   290   write(23 from 23) -> (121) Server: badhttpserver\r\n
   291   write(23 from 23) -> (121) Server: badhttpserver\r\n
   291   write(37 from 37) -> (84) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   292   write(37 from 37) -> (84) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   292   write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n
   293   write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n
   293   write(21 from 21) -> (22) Content-Length: 405\r\n
   294   write(21 from 21) -> (22) Content-Length: 417\r\n
   294   write(2 from 2) -> (20) \r\n
   295   write(2 from 2) -> (20) \r\n
   295   write(20 from 405) -> (0) lookup changegroupsu
   296   write(20 from 417) -> (0) lookup changegroupsu
   296   write limit reached; closing socket
   297   write limit reached; closing socket
   297 
   298 
   298   $ rm -f error.log
   299   $ rm -f error.log
   299 
   300 
   300 Server sends incomplete headers for batch request
   301 Server sends incomplete headers for batch request
   304 
   305 
   305 TODO this output is horrible
   306 TODO this output is horrible
   306 
   307 
   307   $ hg clone http://localhost:$HGPORT/ clone
   308   $ hg clone http://localhost:$HGPORT/ clone
   308   abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
   309   abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
   309   ---%<--- (application/mercuria)
   310   ---%<--- (applicat)
   310   
   311   
   311   ---%<---
   312   ---%<---
   312   !
   313   !
   313   [255]
   314   [255]
   314 
   315 
   323   readline(-1) -> (2) \r\n
   324   readline(-1) -> (2) \r\n
   324   write(36 from 36) -> (659) HTTP/1.1 200 Script output follows\r\n
   325   write(36 from 36) -> (659) HTTP/1.1 200 Script output follows\r\n
   325   write(23 from 23) -> (636) Server: badhttpserver\r\n
   326   write(23 from 23) -> (636) Server: badhttpserver\r\n
   326   write(37 from 37) -> (599) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   327   write(37 from 37) -> (599) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   327   write(41 from 41) -> (558) Content-Type: application/mercurial-0.1\r\n
   328   write(41 from 41) -> (558) Content-Type: application/mercurial-0.1\r\n
   328   write(21 from 21) -> (537) Content-Length: 405\r\n
   329   write(21 from 21) -> (537) Content-Length: 417\r\n
   329   write(2 from 2) -> (535) \r\n
   330   write(2 from 2) -> (535) \r\n
   330   write(405 from 405) -> (130) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   331   write(417 from 417) -> (118) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   331   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   332   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   332   readline(-1) -> (27) Accept-Encoding: identity\r\n
   333   readline(-1) -> (27) Accept-Encoding: identity\r\n
   333   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   334   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   334   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   335   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   335   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   336   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   336   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   337   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   337   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   338   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   338   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   339   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   339   readline(-1) -> (2) \r\n
   340   readline(-1) -> (2) \r\n
   340   write(36 from 36) -> (94) HTTP/1.1 200 Script output follows\r\n
   341   write(36 from 36) -> (82) HTTP/1.1 200 Script output follows\r\n
   341   write(23 from 23) -> (71) Server: badhttpserver\r\n
   342   write(23 from 23) -> (59) Server: badhttpserver\r\n
   342   write(37 from 37) -> (34) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   343   write(37 from 37) -> (22) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   343   write(34 from 41) -> (0) Content-Type: application/mercuria
   344   write(22 from 41) -> (0) Content-Type: applicat
   344   write limit reached; closing socket
   345   write limit reached; closing socket
   345   write(36) -> HTTP/1.1 500 Internal Server Error\r\n
   346   write(36) -> HTTP/1.1 500 Internal Server Error\r\n
   346 
   347 
   347   $ rm -f error.log
   348   $ rm -f error.log
   348 
   349 
   371   readline(-1) -> (2) \r\n
   372   readline(-1) -> (2) \r\n
   372   write(36 from 36) -> (724) HTTP/1.1 200 Script output follows\r\n
   373   write(36 from 36) -> (724) HTTP/1.1 200 Script output follows\r\n
   373   write(23 from 23) -> (701) Server: badhttpserver\r\n
   374   write(23 from 23) -> (701) Server: badhttpserver\r\n
   374   write(37 from 37) -> (664) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   375   write(37 from 37) -> (664) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   375   write(41 from 41) -> (623) Content-Type: application/mercurial-0.1\r\n
   376   write(41 from 41) -> (623) Content-Type: application/mercurial-0.1\r\n
   376   write(21 from 21) -> (602) Content-Length: 405\r\n
   377   write(21 from 21) -> (602) Content-Length: 417\r\n
   377   write(2 from 2) -> (600) \r\n
   378   write(2 from 2) -> (600) \r\n
   378   write(405 from 405) -> (195) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   379   write(417 from 417) -> (183) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   379   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   380   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   380   readline(-1) -> (27) Accept-Encoding: identity\r\n
   381   readline(-1) -> (27) Accept-Encoding: identity\r\n
   381   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   382   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   382   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   383   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   383   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   384   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   384   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   385   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   385   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   386   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   386   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   387   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   387   readline(-1) -> (2) \r\n
   388   readline(-1) -> (2) \r\n
   388   write(36 from 36) -> (159) HTTP/1.1 200 Script output follows\r\n
   389   write(36 from 36) -> (147) HTTP/1.1 200 Script output follows\r\n
   389   write(23 from 23) -> (136) Server: badhttpserver\r\n
   390   write(23 from 23) -> (124) Server: badhttpserver\r\n
   390   write(37 from 37) -> (99) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   391   write(37 from 37) -> (87) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   391   write(41 from 41) -> (58) Content-Type: application/mercurial-0.1\r\n
   392   write(41 from 41) -> (46) Content-Type: application/mercurial-0.1\r\n
   392   write(20 from 20) -> (38) Content-Length: 42\r\n
   393   write(20 from 20) -> (26) Content-Length: 42\r\n
   393   write(2 from 2) -> (36) \r\n
   394   write(2 from 2) -> (24) \r\n
   394   write(36 from 42) -> (0) 96ee1d7354c4ad7372047672c36a1f561e3a
   395   write(24 from 42) -> (0) 96ee1d7354c4ad7372047672
   395   write limit reached; closing socket
   396   write limit reached; closing socket
   396 
   397 
   397   $ rm -f error.log
   398   $ rm -f error.log
   398 
   399 
   399 Server sends incomplete headers for getbundle response
   400 Server sends incomplete headers for getbundle response
   404 TODO this output is terrible
   405 TODO this output is terrible
   405 
   406 
   406   $ hg clone http://localhost:$HGPORT/ clone
   407   $ hg clone http://localhost:$HGPORT/ clone
   407   requesting all changes
   408   requesting all changes
   408   abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
   409   abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
   409   ---%<--- (application/mercuri)
   410   ---%<--- (applica)
   410   
   411   
   411   ---%<---
   412   ---%<---
   412   !
   413   !
   413   [255]
   414   [255]
   414 
   415 
   423   readline(-1) -> (2) \r\n
   424   readline(-1) -> (2) \r\n
   424   write(36 from 36) -> (859) HTTP/1.1 200 Script output follows\r\n
   425   write(36 from 36) -> (859) HTTP/1.1 200 Script output follows\r\n
   425   write(23 from 23) -> (836) Server: badhttpserver\r\n
   426   write(23 from 23) -> (836) Server: badhttpserver\r\n
   426   write(37 from 37) -> (799) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   427   write(37 from 37) -> (799) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   427   write(41 from 41) -> (758) Content-Type: application/mercurial-0.1\r\n
   428   write(41 from 41) -> (758) Content-Type: application/mercurial-0.1\r\n
   428   write(21 from 21) -> (737) Content-Length: 405\r\n
   429   write(21 from 21) -> (737) Content-Length: 417\r\n
   429   write(2 from 2) -> (735) \r\n
   430   write(2 from 2) -> (735) \r\n
   430   write(405 from 405) -> (330) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   431   write(417 from 417) -> (318) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   431   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   432   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   432   readline(-1) -> (27) Accept-Encoding: identity\r\n
   433   readline(-1) -> (27) Accept-Encoding: identity\r\n
   433   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   434   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   434   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   435   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   435   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   436   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   436   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   437   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   437   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   438   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   438   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   439   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   439   readline(-1) -> (2) \r\n
   440   readline(-1) -> (2) \r\n
   440   write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n
   441   write(36 from 36) -> (282) HTTP/1.1 200 Script output follows\r\n
   441   write(23 from 23) -> (271) Server: badhttpserver\r\n
   442   write(23 from 23) -> (259) Server: badhttpserver\r\n
   442   write(37 from 37) -> (234) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   443   write(37 from 37) -> (222) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   443   write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n
   444   write(41 from 41) -> (181) Content-Type: application/mercurial-0.1\r\n
   444   write(20 from 20) -> (173) Content-Length: 42\r\n
   445   write(20 from 20) -> (161) Content-Length: 42\r\n
   445   write(2 from 2) -> (171) \r\n
   446   write(2 from 2) -> (159) \r\n
   446   write(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
   447   write(42 from 42) -> (117) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
   447   readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
   448   readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
   448   readline(-1) -> (27) Accept-Encoding: identity\r\n
   449   readline(-1) -> (27) Accept-Encoding: identity\r\n
   449   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   450   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   450   readline(-1) -> (396) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
   451   readline(-1) -> (410) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
   451   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   452   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   452   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   453   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   453   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   454   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   454   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   455   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   455   readline(-1) -> (2) \r\n
   456   readline(-1) -> (2) \r\n
   456   write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n
   457   write(36 from 36) -> (81) HTTP/1.1 200 Script output follows\r\n
   457   write(23 from 23) -> (70) Server: badhttpserver\r\n
   458   write(23 from 23) -> (58) Server: badhttpserver\r\n
   458   write(37 from 37) -> (33) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   459   write(37 from 37) -> (21) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   459   write(33 from 41) -> (0) Content-Type: application/mercuri
   460   write(21 from 41) -> (0) Content-Type: applica
   460   write limit reached; closing socket
   461   write limit reached; closing socket
   461   write(36) -> HTTP/1.1 500 Internal Server Error\r\n
   462   write(36) -> HTTP/1.1 500 Internal Server Error\r\n
   462 
   463 
   463   $ rm -f error.log
   464   $ rm -f error.log
   464 
   465 
   465 Server sends empty HTTP body for getbundle
   466 Server sends empty HTTP body for getbundle
   466 
   467 
   467   $ hg serve --config badserver.closeaftersendbytes=933 -p $HGPORT -d --pid-file=hg.pid -E error.log
   468   $ hg serve --config badserver.closeaftersendbytes=945 -p $HGPORT -d --pid-file=hg.pid -E error.log
   468   $ cat hg.pid > $DAEMON_PIDS
   469   $ cat hg.pid > $DAEMON_PIDS
   469 
   470 
   470   $ hg clone http://localhost:$HGPORT/ clone
   471   $ hg clone http://localhost:$HGPORT/ clone
   471   requesting all changes
   472   requesting all changes
   472   abort: HTTP request error (incomplete response)
   473   abort: HTTP request error (incomplete response)
   480   readline(-1) -> (27) Accept-Encoding: identity\r\n
   481   readline(-1) -> (27) Accept-Encoding: identity\r\n
   481   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   482   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   482   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   483   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   483   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   484   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   484   readline(-1) -> (2) \r\n
   485   readline(-1) -> (2) \r\n
   485   write(36 from 36) -> (897) HTTP/1.1 200 Script output follows\r\n
   486   write(36 from 36) -> (909) HTTP/1.1 200 Script output follows\r\n
   486   write(23 from 23) -> (874) Server: badhttpserver\r\n
   487   write(23 from 23) -> (886) Server: badhttpserver\r\n
   487   write(37 from 37) -> (837) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   488   write(37 from 37) -> (849) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   488   write(41 from 41) -> (796) Content-Type: application/mercurial-0.1\r\n
   489   write(41 from 41) -> (808) Content-Type: application/mercurial-0.1\r\n
   489   write(21 from 21) -> (775) Content-Length: 405\r\n
   490   write(21 from 21) -> (787) Content-Length: 417\r\n
   490   write(2 from 2) -> (773) \r\n
   491   write(2 from 2) -> (785) \r\n
   491   write(405 from 405) -> (368) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   492   write(417 from 417) -> (368) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   492   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   493   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   493   readline(-1) -> (27) Accept-Encoding: identity\r\n
   494   readline(-1) -> (27) Accept-Encoding: identity\r\n
   494   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   495   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   495   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   496   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   496   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   497   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   506   write(2 from 2) -> (209) \r\n
   507   write(2 from 2) -> (209) \r\n
   507   write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
   508   write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
   508   readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
   509   readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
   509   readline(-1) -> (27) Accept-Encoding: identity\r\n
   510   readline(-1) -> (27) Accept-Encoding: identity\r\n
   510   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   511   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   511   readline(-1) -> (396) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
   512   readline(-1) -> (410) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
   512   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   513   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   513   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   514   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   514   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   515   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   515   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   516   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   516   readline(-1) -> (2) \r\n
   517   readline(-1) -> (2) \r\n
   525 
   526 
   526   $ rm -f error.log
   527   $ rm -f error.log
   527 
   528 
   528 Server sends partial compression string
   529 Server sends partial compression string
   529 
   530 
   530   $ hg serve --config badserver.closeaftersendbytes=945 -p $HGPORT -d --pid-file=hg.pid -E error.log
   531   $ hg serve --config badserver.closeaftersendbytes=957 -p $HGPORT -d --pid-file=hg.pid -E error.log
   531   $ cat hg.pid > $DAEMON_PIDS
   532   $ cat hg.pid > $DAEMON_PIDS
   532 
   533 
   533   $ hg clone http://localhost:$HGPORT/ clone
   534   $ hg clone http://localhost:$HGPORT/ clone
   534   requesting all changes
   535   requesting all changes
   535   abort: HTTP request error (incomplete response; expected 1 bytes got 3)
   536   abort: HTTP request error (incomplete response; expected 1 bytes got 3)
   543   readline(-1) -> (27) Accept-Encoding: identity\r\n
   544   readline(-1) -> (27) Accept-Encoding: identity\r\n
   544   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   545   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   545   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   546   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   546   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   547   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   547   readline(-1) -> (2) \r\n
   548   readline(-1) -> (2) \r\n
   548   write(36 from 36) -> (909) HTTP/1.1 200 Script output follows\r\n
   549   write(36 from 36) -> (921) HTTP/1.1 200 Script output follows\r\n
   549   write(23 from 23) -> (886) Server: badhttpserver\r\n
   550   write(23 from 23) -> (898) Server: badhttpserver\r\n
   550   write(37 from 37) -> (849) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   551   write(37 from 37) -> (861) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
   551   write(41 from 41) -> (808) Content-Type: application/mercurial-0.1\r\n
   552   write(41 from 41) -> (820) Content-Type: application/mercurial-0.1\r\n
   552   write(21 from 21) -> (787) Content-Length: 405\r\n
   553   write(21 from 21) -> (799) Content-Length: 417\r\n
   553   write(2 from 2) -> (785) \r\n
   554   write(2 from 2) -> (797) \r\n
   554   write(405 from 405) -> (380) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   555   write(417 from 417) -> (380) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
   555   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   556   readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   556   readline(-1) -> (27) Accept-Encoding: identity\r\n
   557   readline(-1) -> (27) Accept-Encoding: identity\r\n
   557   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   558   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   558   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   559   readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
   559   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   560   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   569   write(2 from 2) -> (221) \r\n
   570   write(2 from 2) -> (221) \r\n
   570   write(42 from 42) -> (179) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
   571   write(42 from 42) -> (179) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
   571   readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
   572   readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
   572   readline(-1) -> (27) Accept-Encoding: identity\r\n
   573   readline(-1) -> (27) Accept-Encoding: identity\r\n
   573   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   574   readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
   574   readline(-1) -> (396) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
   575   readline(-1) -> (410) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
   575   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   576   readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
   576   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   577   readline(-1) -> (35) accept: application/mercurial-0.1\r\n
   577   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   578   readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
   578   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   579   readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
   579   readline(-1) -> (2) \r\n
   580   readline(-1) -> (2) \r\n
   590 
   591 
   591   $ rm -f error.log
   592   $ rm -f error.log
   592 
   593 
   593 Server sends partial bundle2 header magic
   594 Server sends partial bundle2 header magic
   594 
   595 
   595   $ hg serve --config badserver.closeaftersendbytes=954 -p $HGPORT -d --pid-file=hg.pid -E error.log
   596   $ hg serve --config badserver.closeaftersendbytes=966 -p $HGPORT -d --pid-file=hg.pid -E error.log
   596   $ cat hg.pid > $DAEMON_PIDS
   597   $ cat hg.pid > $DAEMON_PIDS
   597 
   598 
   598   $ hg clone http://localhost:$HGPORT/ clone
   599   $ hg clone http://localhost:$HGPORT/ clone
   599   requesting all changes
   600   requesting all changes
   600   abort: HTTP request error (incomplete response; expected 1 bytes got 3)
   601   abort: HTTP request error (incomplete response; expected 1 bytes got 3)
   614 
   615 
   615   $ rm -f error.log
   616   $ rm -f error.log
   616 
   617 
   617 Server sends incomplete bundle2 stream params length
   618 Server sends incomplete bundle2 stream params length
   618 
   619 
   619   $ hg serve --config badserver.closeaftersendbytes=963 -p $HGPORT -d --pid-file=hg.pid -E error.log
   620   $ hg serve --config badserver.closeaftersendbytes=975 -p $HGPORT -d --pid-file=hg.pid -E error.log
   620   $ cat hg.pid > $DAEMON_PIDS
   621   $ cat hg.pid > $DAEMON_PIDS
   621 
   622 
   622   $ hg clone http://localhost:$HGPORT/ clone
   623   $ hg clone http://localhost:$HGPORT/ clone
   623   requesting all changes
   624   requesting all changes
   624   abort: HTTP request error (incomplete response; expected 1 bytes got 3)
   625   abort: HTTP request error (incomplete response; expected 1 bytes got 3)
   639 
   640 
   640   $ rm -f error.log
   641   $ rm -f error.log
   641 
   642 
   642 Servers stops after bundle2 stream params header
   643 Servers stops after bundle2 stream params header
   643 
   644 
   644   $ hg serve --config badserver.closeaftersendbytes=966 -p $HGPORT -d --pid-file=hg.pid -E error.log
   645   $ hg serve --config badserver.closeaftersendbytes=978 -p $HGPORT -d --pid-file=hg.pid -E error.log
   645   $ cat hg.pid > $DAEMON_PIDS
   646   $ cat hg.pid > $DAEMON_PIDS
   646 
   647 
   647   $ hg clone http://localhost:$HGPORT/ clone
   648   $ hg clone http://localhost:$HGPORT/ clone
   648   requesting all changes
   649   requesting all changes
   649   abort: HTTP request error (incomplete response)
   650   abort: HTTP request error (incomplete response)
   664 
   665 
   665   $ rm -f error.log
   666   $ rm -f error.log
   666 
   667 
   667 Server stops sending after bundle2 part header length
   668 Server stops sending after bundle2 part header length
   668 
   669 
   669   $ hg serve --config badserver.closeaftersendbytes=975 -p $HGPORT -d --pid-file=hg.pid -E error.log
   670   $ hg serve --config badserver.closeaftersendbytes=987 -p $HGPORT -d --pid-file=hg.pid -E error.log
   670   $ cat hg.pid > $DAEMON_PIDS
   671   $ cat hg.pid > $DAEMON_PIDS
   671 
   672 
   672   $ hg clone http://localhost:$HGPORT/ clone
   673   $ hg clone http://localhost:$HGPORT/ clone
   673   requesting all changes
   674   requesting all changes
   674   abort: HTTP request error (incomplete response)
   675   abort: HTTP request error (incomplete response)
   690 
   691 
   691   $ rm -f error.log
   692   $ rm -f error.log
   692 
   693 
   693 Server stops sending after bundle2 part header
   694 Server stops sending after bundle2 part header
   694 
   695 
   695   $ hg serve --config badserver.closeaftersendbytes=1022 -p $HGPORT -d --pid-file=hg.pid -E error.log
   696   $ hg serve --config badserver.closeaftersendbytes=1034 -p $HGPORT -d --pid-file=hg.pid -E error.log
   696   $ cat hg.pid > $DAEMON_PIDS
   697   $ cat hg.pid > $DAEMON_PIDS
   697 
   698 
   698   $ hg clone http://localhost:$HGPORT/ clone
   699   $ hg clone http://localhost:$HGPORT/ clone
   699   requesting all changes
   700   requesting all changes
   700   adding changesets
   701   adding changesets
   720 
   721 
   721   $ rm -f error.log
   722   $ rm -f error.log
   722 
   723 
   723 Server stops after bundle2 part payload chunk size
   724 Server stops after bundle2 part payload chunk size
   724 
   725 
   725   $ hg serve --config badserver.closeaftersendbytes=1031 -p $HGPORT -d --pid-file=hg.pid -E error.log
   726   $ hg serve --config badserver.closeaftersendbytes=1043 -p $HGPORT -d --pid-file=hg.pid -E error.log
   726   $ cat hg.pid > $DAEMON_PIDS
   727   $ cat hg.pid > $DAEMON_PIDS
   727 
   728 
   728   $ hg clone http://localhost:$HGPORT/ clone
   729   $ hg clone http://localhost:$HGPORT/ clone
   729   requesting all changes
   730   requesting all changes
   730   adding changesets
   731   adding changesets
   751 
   752 
   752   $ rm -f error.log
   753   $ rm -f error.log
   753 
   754 
   754 Server stops sending in middle of bundle2 payload chunk
   755 Server stops sending in middle of bundle2 payload chunk
   755 
   756 
   756   $ hg serve --config badserver.closeaftersendbytes=1504 -p $HGPORT -d --pid-file=hg.pid -E error.log
   757   $ hg serve --config badserver.closeaftersendbytes=1516 -p $HGPORT -d --pid-file=hg.pid -E error.log
   757   $ cat hg.pid > $DAEMON_PIDS
   758   $ cat hg.pid > $DAEMON_PIDS
   758 
   759 
   759   $ hg clone http://localhost:$HGPORT/ clone
   760   $ hg clone http://localhost:$HGPORT/ clone
   760   requesting all changes
   761   requesting all changes
   761   adding changesets
   762   adding changesets
   783 
   784 
   784   $ rm -f error.log
   785   $ rm -f error.log
   785 
   786 
   786 Server stops sending after 0 length payload chunk size
   787 Server stops sending after 0 length payload chunk size
   787 
   788 
   788   $ hg serve --config badserver.closeaftersendbytes=1513 -p $HGPORT -d --pid-file=hg.pid -E error.log
   789   $ hg serve --config badserver.closeaftersendbytes=1525 -p $HGPORT -d --pid-file=hg.pid -E error.log
   789   $ cat hg.pid > $DAEMON_PIDS
   790   $ cat hg.pid > $DAEMON_PIDS
   790 
   791 
   791   $ hg clone http://localhost:$HGPORT/ clone
   792   $ hg clone http://localhost:$HGPORT/ clone
   792   requesting all changes
   793   requesting all changes
   793   adding changesets
   794   adding changesets
   820   $ rm -f error.log
   821   $ rm -f error.log
   821 
   822 
   822 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
   823 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
   823 This is before the 0 size chunked transfer part that signals end of HTTP response.
   824 This is before the 0 size chunked transfer part that signals end of HTTP response.
   824 
   825 
   825   $ hg serve --config badserver.closeaftersendbytes=1710 -p $HGPORT -d --pid-file=hg.pid -E error.log
   826   $ hg serve --config badserver.closeaftersendbytes=1722 -p $HGPORT -d --pid-file=hg.pid -E error.log
   826   $ cat hg.pid > $DAEMON_PIDS
   827   $ cat hg.pid > $DAEMON_PIDS
   827 
   828 
   828   $ hg clone http://localhost:$HGPORT/ clone
   829   $ hg clone http://localhost:$HGPORT/ clone
   829   requesting all changes
   830   requesting all changes
   830   adding changesets
   831   adding changesets
   864   $ rm -f error.log
   865   $ rm -f error.log
   865   $ rm -rf clone
   866   $ rm -rf clone
   866 
   867 
   867 Server sends a size 0 chunked-transfer size without terminating \r\n
   868 Server sends a size 0 chunked-transfer size without terminating \r\n
   868 
   869 
   869   $ hg serve --config badserver.closeaftersendbytes=1713 -p $HGPORT -d --pid-file=hg.pid -E error.log
   870   $ hg serve --config badserver.closeaftersendbytes=1725 -p $HGPORT -d --pid-file=hg.pid -E error.log
   870   $ cat hg.pid > $DAEMON_PIDS
   871   $ cat hg.pid > $DAEMON_PIDS
   871 
   872 
   872   $ hg clone http://localhost:$HGPORT/ clone
   873   $ hg clone http://localhost:$HGPORT/ clone
   873   requesting all changes
   874   requesting all changes
   874   adding changesets
   875   adding changesets