comparison tests/test-http-bad-server.t @ 39722:4bd6e444c76f

bundle2: make server.bundle2.stream default to True Support for bundle2 streaming clones has been shipped in Mercurial 4.5 (7eedbd5d4880), but was never activated by default. It's time to have more people use it. The new format allows streaming clones to transport cache (hooray for speed) and phaseroots (fixes phase-related issues). Changes in tests: bundle2 capabilities now have "stream=v2" (plus a '\n' as a separator) and therefore take 14 bytes more: "%0Astream%3Dv2". Tip for tests that have data encoded with CBOR: 0xd3 - 0xc5 = 14. $USUAL_BUNDLE2_CAPS$ replaces $USUAL_BUNDLE2_CAPS_SERVER$, which is the same thing, but without "stream=v2". Since streaming clones now also transfer caches, the reported byte and file counts are higher (e.g. 816 bytes in 9 files instead of 613 bytes in 4 files, a bit of --debug and manual math confirms that the caches take these extra 203 bytes in 5 files). Differential Revision: https://phab.mercurial-scm.org/D4680
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 17 Sep 2018 17:47:24 +0800
parents 98995b689e03
children 8695fbe17f7c 21f5810df848
comparison
equal deleted inserted replaced
39721:1b5880352314 39722:4bd6e444c76f
116 readline(* from -1) -> (2) \r\n (glob) 116 readline(* 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: $HTTP_DATE$\r\n 119 write(37) -> Date: $HTTP_DATE$\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: 436\r\n 121 write(21) -> Content-Length: 450\r\n
122 write(2) -> \r\n 122 write(2) -> \r\n
123 write(436) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash 123 write(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
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(223 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n 127 readline(223 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
128 readline(197 from -1) -> (27) Accept-Encoding: identity\r\n 128 readline(197 from -1) -> (27) Accept-Encoding: identity\r\n
157 readline(* from -1) -> (2) \r\n (glob) 157 readline(* from -1) -> (2) \r\n (glob)
158 write(36) -> HTTP/1.1 200 Script output follows\r\n 158 write(36) -> HTTP/1.1 200 Script output follows\r\n
159 write(23) -> Server: badhttpserver\r\n 159 write(23) -> Server: badhttpserver\r\n
160 write(37) -> Date: $HTTP_DATE$\r\n 160 write(37) -> Date: $HTTP_DATE$\r\n
161 write(41) -> Content-Type: application/mercurial-0.1\r\n 161 write(41) -> Content-Type: application/mercurial-0.1\r\n
162 write(21) -> Content-Length: 436\r\n 162 write(21) -> Content-Length: 450\r\n
163 write(2) -> \r\n 163 write(2) -> \r\n
164 write(436) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash 164 write(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
165 readline(13? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob) 165 readline(13? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
166 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob) 166 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
167 readline(8? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob) 167 readline(8? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
168 readline(5? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob) 168 readline(5? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
169 readline(1? from -1) -> (1?) x-hgproto-1:* (glob) 169 readline(1? from -1) -> (1?) x-hgproto-1:* (glob)
214 readline(* from -1) -> (2) \r\n (glob) 214 readline(* from -1) -> (2) \r\n (glob)
215 write(36) -> HTTP/1.1 200 Script output follows\r\n 215 write(36) -> HTTP/1.1 200 Script output follows\r\n
216 write(23) -> Server: badhttpserver\r\n 216 write(23) -> Server: badhttpserver\r\n
217 write(37) -> Date: $HTTP_DATE$\r\n 217 write(37) -> Date: $HTTP_DATE$\r\n
218 write(41) -> Content-Type: application/mercurial-0.1\r\n 218 write(41) -> Content-Type: application/mercurial-0.1\r\n
219 write(21) -> Content-Length: 449\r\n 219 write(21) -> Content-Length: 463\r\n
220 write(2) -> \r\n 220 write(2) -> \r\n
221 write(449) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash 221 write(463) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
222 readline(1?? from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n (glob) 222 readline(1?? from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n (glob)
223 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob) 223 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
224 readline(1?? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob) 224 readline(1?? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob)
225 readline(6? from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob) 225 readline(6? from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob)
226 readline(3? from -1) -> (19) x-hgargs-post: 28\r\n (glob) 226 readline(3? from -1) -> (19) x-hgargs-post: 28\r\n (glob)
273 273
274 $ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log 274 $ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
275 $ cat hg.pid > $DAEMON_PIDS 275 $ cat hg.pid > $DAEMON_PIDS
276 276
277 $ hg clone http://localhost:$HGPORT/ clone 277 $ hg clone http://localhost:$HGPORT/ clone
278 abort: HTTP request error (incomplete response; expected 436 bytes got 20) 278 abort: HTTP request error (incomplete response; expected 450 bytes got 20)
279 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) 279 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
280 [255] 280 [255]
281 281
282 $ killdaemons.py $DAEMON_PIDS 282 $ killdaemons.py $DAEMON_PIDS
283 283
290 readline(-1) -> (2) \r\n 290 readline(-1) -> (2) \r\n
291 write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n 291 write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n
292 write(23 from 23) -> (121) Server: badhttpserver\r\n 292 write(23 from 23) -> (121) Server: badhttpserver\r\n
293 write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n 293 write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n
294 write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n 294 write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n
295 write(21 from 21) -> (22) Content-Length: 436\r\n 295 write(21 from 21) -> (22) Content-Length: 450\r\n
296 write(2 from 2) -> (20) \r\n 296 write(2 from 2) -> (20) \r\n
297 write(20 from 436) -> (0) batch branchmap bund 297 write(20 from 450) -> (0) batch branchmap bund
298 write limit reached; closing socket 298 write limit reached; closing socket
299 299
300 $ rm -f error.log 300 $ rm -f error.log
301 301
302 Server sends incomplete headers for batch request 302 Server sends incomplete headers for batch request
303 303
304 $ hg serve --config badserver.closeaftersendbytes=714 -p $HGPORT -d --pid-file=hg.pid -E error.log 304 $ hg serve --config badserver.closeaftersendbytes=728 -p $HGPORT -d --pid-file=hg.pid -E error.log
305 $ cat hg.pid > $DAEMON_PIDS 305 $ cat hg.pid > $DAEMON_PIDS
306 306
307 TODO this output is horrible 307 TODO this output is horrible
308 308
309 $ hg clone http://localhost:$HGPORT/ clone 309 $ hg clone http://localhost:$HGPORT/ clone
321 readline(-1) -> (27) Accept-Encoding: identity\r\n 321 readline(-1) -> (27) Accept-Encoding: identity\r\n
322 readline(-1) -> (35) accept: application/mercurial-0.1\r\n 322 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
323 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) 323 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
324 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n 324 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
325 readline(-1) -> (2) \r\n 325 readline(-1) -> (2) \r\n
326 write(36 from 36) -> (678) HTTP/1.1 200 Script output follows\r\n 326 write(36 from 36) -> (692) HTTP/1.1 200 Script output follows\r\n
327 write(23 from 23) -> (655) Server: badhttpserver\r\n 327 write(23 from 23) -> (669) Server: badhttpserver\r\n
328 write(37 from 37) -> (618) Date: $HTTP_DATE$\r\n 328 write(37 from 37) -> (632) Date: $HTTP_DATE$\r\n
329 write(41 from 41) -> (577) Content-Type: application/mercurial-0.1\r\n 329 write(41 from 41) -> (591) Content-Type: application/mercurial-0.1\r\n
330 write(21 from 21) -> (556) Content-Length: 436\r\n 330 write(21 from 21) -> (570) Content-Length: 450\r\n
331 write(2 from 2) -> (554) \r\n 331 write(2 from 2) -> (568) \r\n
332 write(436 from 436) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash 332 write(450 from 450) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
333 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n 333 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
334 readline(-1) -> (27) Accept-Encoding: identity\r\n 334 readline(-1) -> (27) Accept-Encoding: identity\r\n
335 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n 335 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
336 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n 336 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
337 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n 337 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
348 348
349 $ rm -f error.log 349 $ rm -f error.log
350 350
351 Server sends an incomplete HTTP response body to batch request 351 Server sends an incomplete HTTP response body to batch request
352 352
353 $ hg serve --config badserver.closeaftersendbytes=779 -p $HGPORT -d --pid-file=hg.pid -E error.log 353 $ hg serve --config badserver.closeaftersendbytes=793 -p $HGPORT -d --pid-file=hg.pid -E error.log
354 $ cat hg.pid > $DAEMON_PIDS 354 $ cat hg.pid > $DAEMON_PIDS
355 355
356 TODO client spews a stack due to uncaught ValueError in batch.results() 356 TODO client spews a stack due to uncaught ValueError in batch.results()
357 #if no-chg 357 #if no-chg
358 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null 358 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
369 readline(-1) -> (27) Accept-Encoding: identity\r\n 369 readline(-1) -> (27) Accept-Encoding: identity\r\n
370 readline(-1) -> (35) accept: application/mercurial-0.1\r\n 370 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
371 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) 371 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
372 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n 372 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
373 readline(-1) -> (2) \r\n 373 readline(-1) -> (2) \r\n
374 write(36 from 36) -> (743) HTTP/1.1 200 Script output follows\r\n 374 write(36 from 36) -> (757) HTTP/1.1 200 Script output follows\r\n
375 write(23 from 23) -> (720) Server: badhttpserver\r\n 375 write(23 from 23) -> (734) Server: badhttpserver\r\n
376 write(37 from 37) -> (683) Date: $HTTP_DATE$\r\n 376 write(37 from 37) -> (697) Date: $HTTP_DATE$\r\n
377 write(41 from 41) -> (642) Content-Type: application/mercurial-0.1\r\n 377 write(41 from 41) -> (656) Content-Type: application/mercurial-0.1\r\n
378 write(21 from 21) -> (621) Content-Length: 436\r\n 378 write(21 from 21) -> (635) Content-Length: 450\r\n
379 write(2 from 2) -> (619) \r\n 379 write(2 from 2) -> (633) \r\n
380 write(436 from 436) -> (183) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash 380 write(450 from 450) -> (183) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
381 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n 381 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
382 readline(-1) -> (27) Accept-Encoding: identity\r\n 382 readline(-1) -> (27) Accept-Encoding: identity\r\n
383 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n 383 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
384 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n 384 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
385 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n 385 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
398 398
399 $ rm -f error.log 399 $ rm -f error.log
400 400
401 Server sends incomplete headers for getbundle response 401 Server sends incomplete headers for getbundle response
402 402
403 $ hg serve --config badserver.closeaftersendbytes=926 -p $HGPORT -d --pid-file=hg.pid -E error.log 403 $ hg serve --config badserver.closeaftersendbytes=940 -p $HGPORT -d --pid-file=hg.pid -E error.log
404 $ cat hg.pid > $DAEMON_PIDS 404 $ cat hg.pid > $DAEMON_PIDS
405 405
406 TODO this output is terrible 406 TODO this output is terrible
407 407
408 $ hg clone http://localhost:$HGPORT/ clone 408 $ hg clone http://localhost:$HGPORT/ clone
421 readline(-1) -> (27) Accept-Encoding: identity\r\n 421 readline(-1) -> (27) Accept-Encoding: identity\r\n
422 readline(-1) -> (35) accept: application/mercurial-0.1\r\n 422 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
423 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) 423 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
424 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n 424 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
425 readline(-1) -> (2) \r\n 425 readline(-1) -> (2) \r\n
426 write(36 from 36) -> (890) HTTP/1.1 200 Script output follows\r\n 426 write(36 from 36) -> (904) HTTP/1.1 200 Script output follows\r\n
427 write(23 from 23) -> (867) Server: badhttpserver\r\n 427 write(23 from 23) -> (881) Server: badhttpserver\r\n
428 write(37 from 37) -> (830) Date: $HTTP_DATE$\r\n 428 write(37 from 37) -> (844) Date: $HTTP_DATE$\r\n
429 write(41 from 41) -> (789) Content-Type: application/mercurial-0.1\r\n 429 write(41 from 41) -> (803) Content-Type: application/mercurial-0.1\r\n
430 write(21 from 21) -> (768) Content-Length: 436\r\n 430 write(21 from 21) -> (782) Content-Length: 450\r\n
431 write(2 from 2) -> (766) \r\n 431 write(2 from 2) -> (780) \r\n
432 write(436 from 436) -> (330) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash 432 write(450 from 450) -> (330) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
433 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n 433 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
434 readline(-1) -> (27) Accept-Encoding: identity\r\n 434 readline(-1) -> (27) Accept-Encoding: identity\r\n
435 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n 435 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
436 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n 436 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
437 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n 437 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
464 464
465 $ rm -f error.log 465 $ rm -f error.log
466 466
467 Server stops before it sends transfer encoding 467 Server stops before it sends transfer encoding
468 468
469 $ hg serve --config badserver.closeaftersendbytes=959 -p $HGPORT -d --pid-file=hg.pid -E error.log 469 $ hg serve --config badserver.closeaftersendbytes=973 -p $HGPORT -d --pid-file=hg.pid -E error.log
470 $ cat hg.pid > $DAEMON_PIDS 470 $ cat hg.pid > $DAEMON_PIDS
471 471
472 $ hg clone http://localhost:$HGPORT/ clone 472 $ hg clone http://localhost:$HGPORT/ clone
473 requesting all changes 473 requesting all changes
474 abort: stream ended unexpectedly (got 0 bytes, expected 1) 474 abort: stream ended unexpectedly (got 0 bytes, expected 1)
484 484
485 $ rm -f error.log 485 $ rm -f error.log
486 486
487 Server sends empty HTTP body for getbundle 487 Server sends empty HTTP body for getbundle
488 488
489 $ hg serve --config badserver.closeaftersendbytes=964 -p $HGPORT -d --pid-file=hg.pid -E error.log 489 $ hg serve --config badserver.closeaftersendbytes=978 -p $HGPORT -d --pid-file=hg.pid -E error.log
490 $ cat hg.pid > $DAEMON_PIDS 490 $ cat hg.pid > $DAEMON_PIDS
491 491
492 $ hg clone http://localhost:$HGPORT/ clone 492 $ hg clone http://localhost:$HGPORT/ clone
493 requesting all changes 493 requesting all changes
494 abort: HTTP request error (incomplete response) 494 abort: HTTP request error (incomplete response)
502 readline(-1) -> (27) Accept-Encoding: identity\r\n 502 readline(-1) -> (27) Accept-Encoding: identity\r\n
503 readline(-1) -> (35) accept: application/mercurial-0.1\r\n 503 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
504 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) 504 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
505 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n 505 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
506 readline(-1) -> (2) \r\n 506 readline(-1) -> (2) \r\n
507 write(36 from 36) -> (928) HTTP/1.1 200 Script output follows\r\n 507 write(36 from 36) -> (942) HTTP/1.1 200 Script output follows\r\n
508 write(23 from 23) -> (905) Server: badhttpserver\r\n 508 write(23 from 23) -> (919) Server: badhttpserver\r\n
509 write(37 from 37) -> (868) Date: $HTTP_DATE$\r\n 509 write(37 from 37) -> (882) Date: $HTTP_DATE$\r\n
510 write(41 from 41) -> (827) Content-Type: application/mercurial-0.1\r\n 510 write(41 from 41) -> (841) Content-Type: application/mercurial-0.1\r\n
511 write(21 from 21) -> (806) Content-Length: 436\r\n 511 write(21 from 21) -> (820) Content-Length: 450\r\n
512 write(2 from 2) -> (804) \r\n 512 write(2 from 2) -> (818) \r\n
513 write(436 from 436) -> (368) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash 513 write(450 from 450) -> (368) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
514 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n 514 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
515 readline(-1) -> (27) Accept-Encoding: identity\r\n 515 readline(-1) -> (27) Accept-Encoding: identity\r\n
516 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n 516 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
517 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n 517 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
518 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n 518 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
547 547
548 $ rm -f error.log 548 $ rm -f error.log
549 549
550 Server sends partial compression string 550 Server sends partial compression string
551 551
552 $ hg serve --config badserver.closeaftersendbytes=988 -p $HGPORT -d --pid-file=hg.pid -E error.log 552 $ hg serve --config badserver.closeaftersendbytes=1002 -p $HGPORT -d --pid-file=hg.pid -E error.log
553 $ cat hg.pid > $DAEMON_PIDS 553 $ cat hg.pid > $DAEMON_PIDS
554 554
555 $ hg clone http://localhost:$HGPORT/ clone 555 $ hg clone http://localhost:$HGPORT/ clone
556 requesting all changes 556 requesting all changes
557 abort: HTTP request error (incomplete response) 557 abort: HTTP request error (incomplete response)
565 readline(-1) -> (27) Accept-Encoding: identity\r\n 565 readline(-1) -> (27) Accept-Encoding: identity\r\n
566 readline(-1) -> (35) accept: application/mercurial-0.1\r\n 566 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
567 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) 567 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
568 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n 568 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
569 readline(-1) -> (2) \r\n 569 readline(-1) -> (2) \r\n
570 write(36 from 36) -> (952) HTTP/1.1 200 Script output follows\r\n 570 write(36 from 36) -> (966) HTTP/1.1 200 Script output follows\r\n
571 write(23 from 23) -> (929) Server: badhttpserver\r\n 571 write(23 from 23) -> (943) Server: badhttpserver\r\n
572 write(37 from 37) -> (892) Date: $HTTP_DATE$\r\n 572 write(37 from 37) -> (906) Date: $HTTP_DATE$\r\n
573 write(41 from 41) -> (851) Content-Type: application/mercurial-0.1\r\n 573 write(41 from 41) -> (865) Content-Type: application/mercurial-0.1\r\n
574 write(21 from 21) -> (830) Content-Length: 436\r\n 574 write(21 from 21) -> (844) Content-Length: 450\r\n
575 write(2 from 2) -> (828) \r\n 575 write(2 from 2) -> (842) \r\n
576 write(436 from 436) -> (392) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash 576 write(450 from 450) -> (392) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
577 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n 577 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
578 readline(-1) -> (27) Accept-Encoding: identity\r\n 578 readline(-1) -> (27) Accept-Encoding: identity\r\n
579 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n 579 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
580 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n 580 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
581 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n 581 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
613 613
614 $ rm -f error.log 614 $ rm -f error.log
615 615
616 Server sends partial bundle2 header magic 616 Server sends partial bundle2 header magic
617 617
618 $ hg serve --config badserver.closeaftersendbytes=985 -p $HGPORT -d --pid-file=hg.pid -E error.log 618 $ hg serve --config badserver.closeaftersendbytes=999 -p $HGPORT -d --pid-file=hg.pid -E error.log
619 $ cat hg.pid > $DAEMON_PIDS 619 $ cat hg.pid > $DAEMON_PIDS
620 620
621 $ hg clone http://localhost:$HGPORT/ clone 621 $ hg clone http://localhost:$HGPORT/ clone
622 requesting all changes 622 requesting all changes
623 abort: HTTP request error (incomplete response; expected 4 bytes got 3) 623 abort: HTTP request error (incomplete response; expected 4 bytes got 3)
637 637
638 $ rm -f error.log 638 $ rm -f error.log
639 639
640 Server sends incomplete bundle2 stream params length 640 Server sends incomplete bundle2 stream params length
641 641
642 $ hg serve --config badserver.closeaftersendbytes=994 -p $HGPORT -d --pid-file=hg.pid -E error.log 642 $ hg serve --config badserver.closeaftersendbytes=1008 -p $HGPORT -d --pid-file=hg.pid -E error.log
643 $ cat hg.pid > $DAEMON_PIDS 643 $ cat hg.pid > $DAEMON_PIDS
644 644
645 $ hg clone http://localhost:$HGPORT/ clone 645 $ hg clone http://localhost:$HGPORT/ clone
646 requesting all changes 646 requesting all changes
647 abort: HTTP request error (incomplete response; expected 4 bytes got 3) 647 abort: HTTP request error (incomplete response; expected 4 bytes got 3)
662 662
663 $ rm -f error.log 663 $ rm -f error.log
664 664
665 Servers stops after bundle2 stream params header 665 Servers stops after bundle2 stream params header
666 666
667 $ hg serve --config badserver.closeaftersendbytes=997 -p $HGPORT -d --pid-file=hg.pid -E error.log 667 $ hg serve --config badserver.closeaftersendbytes=1011 -p $HGPORT -d --pid-file=hg.pid -E error.log
668 $ cat hg.pid > $DAEMON_PIDS 668 $ cat hg.pid > $DAEMON_PIDS
669 669
670 $ hg clone http://localhost:$HGPORT/ clone 670 $ hg clone http://localhost:$HGPORT/ clone
671 requesting all changes 671 requesting all changes
672 abort: HTTP request error (incomplete response) 672 abort: HTTP request error (incomplete response)
687 687
688 $ rm -f error.log 688 $ rm -f error.log
689 689
690 Server stops sending after bundle2 part header length 690 Server stops sending after bundle2 part header length
691 691
692 $ hg serve --config badserver.closeaftersendbytes=1006 -p $HGPORT -d --pid-file=hg.pid -E error.log 692 $ hg serve --config badserver.closeaftersendbytes=1020 -p $HGPORT -d --pid-file=hg.pid -E error.log
693 $ cat hg.pid > $DAEMON_PIDS 693 $ cat hg.pid > $DAEMON_PIDS
694 694
695 $ hg clone http://localhost:$HGPORT/ clone 695 $ hg clone http://localhost:$HGPORT/ clone
696 requesting all changes 696 requesting all changes
697 abort: HTTP request error (incomplete response) 697 abort: HTTP request error (incomplete response)
713 713
714 $ rm -f error.log 714 $ rm -f error.log
715 715
716 Server stops sending after bundle2 part header 716 Server stops sending after bundle2 part header
717 717
718 $ hg serve --config badserver.closeaftersendbytes=1053 -p $HGPORT -d --pid-file=hg.pid -E error.log 718 $ hg serve --config badserver.closeaftersendbytes=1067 -p $HGPORT -d --pid-file=hg.pid -E error.log
719 $ cat hg.pid > $DAEMON_PIDS 719 $ cat hg.pid > $DAEMON_PIDS
720 720
721 $ hg clone http://localhost:$HGPORT/ clone 721 $ hg clone http://localhost:$HGPORT/ clone
722 requesting all changes 722 requesting all changes
723 adding changesets 723 adding changesets
743 743
744 $ rm -f error.log 744 $ rm -f error.log
745 745
746 Server stops after bundle2 part payload chunk size 746 Server stops after bundle2 part payload chunk size
747 747
748 $ hg serve --config badserver.closeaftersendbytes=1074 -p $HGPORT -d --pid-file=hg.pid -E error.log 748 $ hg serve --config badserver.closeaftersendbytes=1088 -p $HGPORT -d --pid-file=hg.pid -E error.log
749 $ cat hg.pid > $DAEMON_PIDS 749 $ cat hg.pid > $DAEMON_PIDS
750 750
751 $ hg clone http://localhost:$HGPORT/ clone 751 $ hg clone http://localhost:$HGPORT/ clone
752 requesting all changes 752 requesting all changes
753 adding changesets 753 adding changesets
774 774
775 $ rm -f error.log 775 $ rm -f error.log
776 776
777 Server stops sending in middle of bundle2 payload chunk 777 Server stops sending in middle of bundle2 payload chunk
778 778
779 $ hg serve --config badserver.closeaftersendbytes=1535 -p $HGPORT -d --pid-file=hg.pid -E error.log 779 $ hg serve --config badserver.closeaftersendbytes=1549 -p $HGPORT -d --pid-file=hg.pid -E error.log
780 $ cat hg.pid > $DAEMON_PIDS 780 $ cat hg.pid > $DAEMON_PIDS
781 781
782 $ hg clone http://localhost:$HGPORT/ clone 782 $ hg clone http://localhost:$HGPORT/ clone
783 requesting all changes 783 requesting all changes
784 adding changesets 784 adding changesets
806 806
807 $ rm -f error.log 807 $ rm -f error.log
808 808
809 Server stops sending after 0 length payload chunk size 809 Server stops sending after 0 length payload chunk size
810 810
811 $ hg serve --config badserver.closeaftersendbytes=1566 -p $HGPORT -d --pid-file=hg.pid -E error.log 811 $ hg serve --config badserver.closeaftersendbytes=1580 -p $HGPORT -d --pid-file=hg.pid -E error.log
812 $ cat hg.pid > $DAEMON_PIDS 812 $ cat hg.pid > $DAEMON_PIDS
813 813
814 $ hg clone http://localhost:$HGPORT/ clone 814 $ hg clone http://localhost:$HGPORT/ clone
815 requesting all changes 815 requesting all changes
816 adding changesets 816 adding changesets
843 $ rm -f error.log 843 $ rm -f error.log
844 844
845 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload) 845 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
846 This is before the 0 size chunked transfer part that signals end of HTTP response. 846 This is before the 0 size chunked transfer part that signals end of HTTP response.
847 847
848 # $ hg serve --config badserver.closeaftersendbytes=1741 -p $HGPORT -d --pid-file=hg.pid -E error.log 848 # $ hg serve --config badserver.closeaftersendbytes=1755 -p $HGPORT -d --pid-file=hg.pid -E error.log
849 $ hg serve --config badserver.closeaftersendbytes=1848 -p $HGPORT -d --pid-file=hg.pid -E error.log 849 $ hg serve --config badserver.closeaftersendbytes=1862 -p $HGPORT -d --pid-file=hg.pid -E error.log
850 $ cat hg.pid > $DAEMON_PIDS 850 $ cat hg.pid > $DAEMON_PIDS
851 851
852 $ hg clone http://localhost:$HGPORT/ clone 852 $ hg clone http://localhost:$HGPORT/ clone
853 requesting all changes 853 requesting all changes
854 adding changesets 854 adding changesets
888 $ rm -f error.log 888 $ rm -f error.log
889 $ rm -rf clone 889 $ rm -rf clone
890 890
891 Server sends a size 0 chunked-transfer size without terminating \r\n 891 Server sends a size 0 chunked-transfer size without terminating \r\n
892 892
893 $ hg serve --config badserver.closeaftersendbytes=1851 -p $HGPORT -d --pid-file=hg.pid -E error.log 893 $ hg serve --config badserver.closeaftersendbytes=1865 -p $HGPORT -d --pid-file=hg.pid -E error.log
894 $ cat hg.pid > $DAEMON_PIDS 894 $ cat hg.pid > $DAEMON_PIDS
895 895
896 $ hg clone http://localhost:$HGPORT/ clone 896 $ hg clone http://localhost:$HGPORT/ clone
897 requesting all changes 897 requesting all changes
898 adding changesets 898 adding changesets