tests/test-http-bad-server.t
author Gregory Szorc <gregory.szorc@gmail.com>
Sun, 16 Apr 2017 11:55:08 -0700
changeset 32024 ad41739c6b2b
parent 32022 e5d7f99a3063
child 32064 f82cdd5ee57e
permissions -rw-r--r--
bundle2: ignore errors seeking a bundle after an exception (issue4784) Many have seen a "stream ended unexpectedly" error. This message is raised from changegroup.readexactly() when a read(n) operation fails to return exactly N bytes. I believe most occurrences of this error in the wild stem from the code changed in this patch. Before, if bundle2's part applicator raised an Exception when processing/applying parts, the exception handler would attempt to iterate the remaining parts. If I/O during this iteration failed, it would likely raise the "stream ended unexpectedly" exception. The problem with this approach is that if we already encountered an I/O error iterating the bundle2 data during application, then any further I/O would almost certainly fail. If the original stream were closed, changegroup.readexactly() would obtain an empty string, triggering "stream ended unexpectedly" with "got 0." This is the error message that users would see. What's worse is that the original I/O related exception would be lost since a new exception would be raised. This made debugging the actual I/O failure effectively impossible. This patch changes the exception handler for bundle2 application to ignore errors when seeking the underlying stream. When the underlying error is I/O related, the seek should fail fast and the original exception will be re-raised. The output changes in test-http-bad-server.t demonstrate this. When the underlying error is not I/O related and the stream can be seeked, the old behavior is preserved.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
#require killdaemons serve zstd
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     3
Client version is embedded in HTTP request and is effectively dynamic. Pin the
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
version so behavior is deterministic.
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     5
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     6
  $ cat > fakeversion.py << EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     7
  > from mercurial import util
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     8
  > util.version = lambda: '4.2'
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     9
  > EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    10
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    11
  $ cat >> $HGRCPATH << EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    12
  > [extensions]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    13
  > fakeversion = `pwd`/fakeversion.py
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    14
  > EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    15
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    16
  $ hg init server0
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    17
  $ cd server0
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    18
  $ touch foo
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    19
  $ hg -q commit -A -m initial
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    20
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    21
Also disable compression because zstd is optional and causes output to vary
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    22
and because debugging partial responses is hard when compression is involved
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    23
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    24
  $ cat > .hg/hgrc << EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    25
  > [extensions]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    26
  > badserver = $TESTDIR/badserverext.py
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    27
  > [server]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    28
  > compressionengines = none
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    29
  > EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    30
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    31
Failure to accept() socket should result in connection related error message
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    32
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    33
  $ hg --config badserver.closebeforeaccept=true serve -p $HGPORT -d --pid-file=hg.pid
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    34
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    35
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    36
  $ hg clone http://localhost:$HGPORT/ clone
32020
acc67cd7f508 test-http-bad-server: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32002
diff changeset
    37
  abort: error: Connection reset by peer (no-windows !)
acc67cd7f508 test-http-bad-server: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32002
diff changeset
    38
  abort: error: An existing connection was forcibly closed by the remote host (windows !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    39
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    40
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    41
(The server exits on its own, but there is a race between that and starting a new server.
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    42
So ensure the process is dead.)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    43
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    44
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    45
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    46
Failure immediately after accept() should yield connection related error message
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    47
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    48
  $ hg --config badserver.closeafteraccept=true serve -p $HGPORT -d --pid-file=hg.pid
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    49
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    50
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    51
  $ hg clone http://localhost:$HGPORT/ clone
32020
acc67cd7f508 test-http-bad-server: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32002
diff changeset
    52
  abort: error: Connection reset by peer (no-windows !)
acc67cd7f508 test-http-bad-server: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32002
diff changeset
    53
  abort: error: An existing connection was forcibly closed by the remote host (windows !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    54
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    55
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    56
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    57
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    58
Failure to read all bytes in initial HTTP request should yield connection related error message
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    59
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    60
  $ hg --config badserver.closeafterrecvbytes=1 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    61
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    62
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    63
TODO this error message is not very good
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    64
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    65
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    66
  abort: error: ''
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    67
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    68
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    69
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    70
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    71
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    72
  readline(1 from 65537) -> (1) G
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    73
  read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    74
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    75
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    76
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    77
Same failure, but server reads full HTTP request line
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    78
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    79
  $ hg --config badserver.closeafterrecvbytes=40 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    80
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    81
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    82
  abort: error: ''
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    83
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    84
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    85
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    86
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    87
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    88
  readline(40 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    89
  readline(7 from -1) -> (7) Accept-
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    90
  read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    91
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    92
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    93
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    94
Failure on subsequent HTTP request on the same socket (cmd?batch)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    95
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    96
  $ hg --config badserver.closeafterrecvbytes=210 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    97
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    98
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    99
  abort: error: ''
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   100
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   101
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   102
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   103
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   104
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   105
  readline(210 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   106
  readline(177 from -1) -> (27) Accept-Encoding: identity\r\n
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   107
  readline(150 from -1) -> (35) accept: application/mercurial-0.1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   108
  readline(115 from -1) -> (23) host: localhost:$HGPORT\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   109
  readline(92 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   110
  readline(43 from -1) -> (2) \r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   111
  write(36) -> HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   112
  write(23) -> Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   113
  write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   114
  write(41) -> Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   115
  write(21) -> Content-Length: 405\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   116
  write(2) -> \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   117
  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
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   118
  readline(41 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   119
  readline(15 from -1) -> (15) Accept-Encoding
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   120
  read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   121
  readline(210 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   122
  readline(184 from -1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   123
  readline(157 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   124
  readline(128 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   125
  readline(87 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   126
  readline(39 from -1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   127
  readline(4 from -1) -> (4) host
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   128
  read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   129
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   130
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   131
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   132
Failure to read getbundle HTTP request
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   133
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   134
  $ hg --config badserver.closeafterrecvbytes=292 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   135
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   136
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   137
  requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   138
  abort: error: ''
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   139
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   140
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   141
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   142
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   143
  $ cat error.log
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   144
  readline(292 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   145
  readline(259 from -1) -> (27) Accept-Encoding: identity\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   146
  readline(232 from -1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   147
  readline(197 from -1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   148
  readline(174 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   149
  readline(125 from -1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   150
  write(36) -> HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   151
  write(23) -> Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   152
  write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   153
  write(41) -> Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   154
  write(21) -> Content-Length: 405\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   155
  write(2) -> \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   156
  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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   157
  readline(123 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   158
  readline(97 from -1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   159
  readline(70 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   160
  readline(41 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   161
  read limit reached; closing socket
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   162
  readline(292 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   163
  readline(266 from -1) -> (27) Accept-Encoding: identity\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   164
  readline(239 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   165
  readline(210 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   166
  readline(169 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   167
  readline(121 from -1) -> (35) accept: application/mercurial-0.1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   168
  readline(86 from -1) -> (23) host: localhost:$HGPORT\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   169
  readline(63 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   170
  readline(14 from -1) -> (2) \r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   171
  write(36) -> HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   172
  write(23) -> Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   173
  write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   174
  write(41) -> Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   175
  write(20) -> Content-Length: 42\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   176
  write(2) -> \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   177
  write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   178
  readline(12 from 65537) -> (12) GET /?cmd=ge
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   179
  read limit reached; closing socket
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   180
  readline(292 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   181
  readline(262 from -1) -> (27) Accept-Encoding: identity\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   182
  readline(235 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   183
  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
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   184
  read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   185
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   186
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   187
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   188
Now do a variation using POST to send arguments
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   189
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   190
  $ hg --config experimental.httppostargs=true --config badserver.closeafterrecvbytes=315 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   191
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   192
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   193
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   194
  abort: error: ''
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   195
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   196
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   197
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   198
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   199
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   200
  readline(315 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   201
  readline(282 from -1) -> (27) Accept-Encoding: identity\r\n
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   202
  readline(255 from -1) -> (35) accept: application/mercurial-0.1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   203
  readline(220 from -1) -> (23) host: localhost:$HGPORT\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   204
  readline(197 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   205
  readline(148 from -1) -> (2) \r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   206
  write(36) -> HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   207
  write(23) -> Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   208
  write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   209
  write(41) -> Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   210
  write(21) -> Content-Length: 418\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   211
  write(2) -> \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   212
  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
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   213
  readline(146 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   214
  readline(119 from -1) -> (27) Accept-Encoding: identity\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   215
  readline(92 from -1) -> (41) content-type: application/mercurial-0.1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   216
  readline(51 from -1) -> (19) vary: X-HgProto-1\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   217
  readline(32 from -1) -> (19) x-hgargs-post: 28\r\n
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
   218
  readline(13 from -1) -> (13) x-hgproto-1: 
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   219
  read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   220
  readline(315 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   221
  readline(288 from -1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   222
  readline(261 from -1) -> (41) content-type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   223
  readline(220 from -1) -> (19) vary: X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   224
  readline(201 from -1) -> (19) x-hgargs-post: 28\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   225
  readline(182 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   226
  readline(134 from -1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   227
  readline(99 from -1) -> (20) content-length: 28\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   228
  readline(79 from -1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   229
  readline(56 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   230
  readline(7 from -1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   231
  read(5 from 28) -> (5) cmds=
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   232
  read limit reached, closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   233
  write(36) -> HTTP/1.1 500 Internal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   234
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   235
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   236
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   237
Now move on to partial server responses
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   238
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   239
Server sends a single character from the HTTP response line
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   240
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   241
  $ hg --config badserver.closeaftersendbytes=1 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   242
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   243
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   244
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   245
  abort: error: H
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   246
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   247
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   248
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   249
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   250
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   251
  readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   252
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   253
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   254
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   255
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   256
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   257
  write(1 from 36) -> (0) H
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   258
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   259
  write(36) -> HTTP/1.1 500 Internal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   260
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   261
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   262
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   263
Server sends an incomplete capabilities response body
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   264
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   265
  $ hg --config badserver.closeaftersendbytes=180 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   266
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   267
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   268
  $ hg clone http://localhost:$HGPORT/ clone
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   269
  abort: HTTP request error (incomplete response; expected 385 bytes got 20)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   270
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   271
  [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   272
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   273
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   274
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   275
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   276
  readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   277
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   278
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   279
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   280
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   281
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   282
  write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   283
  write(23 from 23) -> (121) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   284
  write(37 from 37) -> (84) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   285
  write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   286
  write(21 from 21) -> (22) Content-Length: 405\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   287
  write(2 from 2) -> (20) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   288
  write(20 from 405) -> (0) lookup changegroupsu
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   289
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   290
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   291
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   292
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   293
Server sends incomplete headers for batch request
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   294
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   295
  $ hg --config badserver.closeaftersendbytes=695 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   296
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   297
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   298
TODO this output is horrible
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   299
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   300
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   301
  abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   302
  ---%<--- (application/mercuria)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   303
  
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   304
  ---%<---
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   305
  !
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   306
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   307
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   308
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   309
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   310
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   311
  readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   312
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   313
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   314
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   315
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   316
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   317
  write(36 from 36) -> (659) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   318
  write(23 from 23) -> (636) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   319
  write(37 from 37) -> (599) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   320
  write(41 from 41) -> (558) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   321
  write(21 from 21) -> (537) Content-Length: 405\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   322
  write(2 from 2) -> (535) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   323
  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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   324
  readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   325
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   326
  readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   327
  readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   328
  readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   329
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   330
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   331
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   332
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   333
  write(36 from 36) -> (94) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   334
  write(23 from 23) -> (71) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   335
  write(37 from 37) -> (34) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   336
  write(34 from 41) -> (0) Content-Type: application/mercuria
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   337
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   338
  write(36) -> HTTP/1.1 500 Internal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   339
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   340
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   341
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   342
Server sends an incomplete HTTP response body to batch request
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   343
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   344
  $ hg --config badserver.closeaftersendbytes=760 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   345
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   346
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   347
TODO client spews a stack due to uncaught ValueError in batch.results()
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   348
  $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   349
  [1]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   350
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   351
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   352
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   353
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   354
  readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   355
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   356
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   357
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   358
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   359
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   360
  write(36 from 36) -> (724) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   361
  write(23 from 23) -> (701) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   362
  write(37 from 37) -> (664) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   363
  write(41 from 41) -> (623) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   364
  write(21 from 21) -> (602) Content-Length: 405\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   365
  write(2 from 2) -> (600) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   366
  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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   367
  readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   368
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   369
  readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   370
  readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   371
  readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   372
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   373
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   374
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   375
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   376
  write(36 from 36) -> (159) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   377
  write(23 from 23) -> (136) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   378
  write(37 from 37) -> (99) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   379
  write(41 from 41) -> (58) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   380
  write(20 from 20) -> (38) Content-Length: 42\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   381
  write(2 from 2) -> (36) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   382
  write(36 from 42) -> (0) 96ee1d7354c4ad7372047672c36a1f561e3a
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   383
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   384
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   385
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   386
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   387
Server sends incomplete headers for getbundle response
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   388
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   389
  $ hg --config badserver.closeaftersendbytes=895 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   390
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   391
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   392
TODO this output is terrible
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   393
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   394
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   395
  requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   396
  abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   397
  ---%<--- (application/mercuri)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   398
  
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   399
  ---%<---
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   400
  !
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   401
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   402
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   403
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   404
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   405
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   406
  readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   407
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   408
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   409
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   410
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   411
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   412
  write(36 from 36) -> (859) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   413
  write(23 from 23) -> (836) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   414
  write(37 from 37) -> (799) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   415
  write(41 from 41) -> (758) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   416
  write(21 from 21) -> (737) Content-Length: 405\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   417
  write(2 from 2) -> (735) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   418
  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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   419
  readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   420
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   421
  readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   422
  readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   423
  readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   424
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   425
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   426
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   427
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   428
  write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   429
  write(23 from 23) -> (271) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   430
  write(37 from 37) -> (234) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   431
  write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   432
  write(20 from 20) -> (173) Content-Length: 42\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   433
  write(2 from 2) -> (171) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   434
  write(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   435
  readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   436
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   437
  readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   438
  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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   439
  readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   440
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   441
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   442
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   443
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   444
  write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   445
  write(23 from 23) -> (70) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   446
  write(37 from 37) -> (33) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   447
  write(33 from 41) -> (0) Content-Type: application/mercuri
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   448
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   449
  write(36) -> HTTP/1.1 500 Internal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   450
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   451
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   452
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   453
Server sends empty HTTP body for getbundle
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   454
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   455
  $ hg --config badserver.closeaftersendbytes=933 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   456
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   457
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   458
  $ hg clone http://localhost:$HGPORT/ clone
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   459
  requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   460
  abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   461
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   462
  [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   463
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   464
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   465
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   466
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   467
  readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   468
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   469
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   470
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   471
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   472
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   473
  write(36 from 36) -> (897) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   474
  write(23 from 23) -> (874) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   475
  write(37 from 37) -> (837) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   476
  write(41 from 41) -> (796) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   477
  write(21 from 21) -> (775) Content-Length: 405\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   478
  write(2 from 2) -> (773) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   479
  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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   480
  readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   481
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   482
  readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   483
  readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   484
  readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   485
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   486
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   487
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   488
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   489
  write(36 from 36) -> (332) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   490
  write(23 from 23) -> (309) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   491
  write(37 from 37) -> (272) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   492
  write(41 from 41) -> (231) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   493
  write(20 from 20) -> (211) Content-Length: 42\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   494
  write(2 from 2) -> (209) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   495
  write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   496
  readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   497
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   498
  readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   499
  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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   500
  readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   501
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   502
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   503
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   504
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   505
  write(36 from 36) -> (131) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   506
  write(23 from 23) -> (108) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   507
  write(37 from 37) -> (71) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   508
  write(41 from 41) -> (30) Content-Type: application/mercurial-0.2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   509
  write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   510
  write(2 from 2) -> (0) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   511
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   512
  write(36) -> HTTP/1.1 500 Internal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   513
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   514
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   515
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   516
Server sends partial compression string
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   517
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   518
  $ hg --config badserver.closeaftersendbytes=945 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   519
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   520
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   521
  $ hg clone http://localhost:$HGPORT/ clone
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   522
  requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   523
  abort: HTTP request error (incomplete response; expected 1 bytes got 3)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   524
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   525
  [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   526
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   527
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   528
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   529
  $ cat error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   530
  readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   531
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   532
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   533
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   534
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   535
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   536
  write(36 from 36) -> (909) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   537
  write(23 from 23) -> (886) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   538
  write(37 from 37) -> (849) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   539
  write(41 from 41) -> (808) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   540
  write(21 from 21) -> (787) Content-Length: 405\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   541
  write(2 from 2) -> (785) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   542
  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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   543
  readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   544
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   545
  readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   546
  readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   547
  readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   548
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   549
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   550
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   551
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   552
  write(36 from 36) -> (344) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   553
  write(23 from 23) -> (321) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   554
  write(37 from 37) -> (284) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   555
  write(41 from 41) -> (243) Content-Type: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   556
  write(20 from 20) -> (223) Content-Length: 42\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   557
  write(2 from 2) -> (221) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   558
  write(42 from 42) -> (179) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   559
  readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   560
  readline(-1) -> (27) Accept-Encoding: identity\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   561
  readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   562
  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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   563
  readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   564
  readline(-1) -> (35) accept: application/mercurial-0.1\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   565
  readline(-1) -> (23) host: localhost:$HGPORT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   566
  readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   567
  readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   568
  write(36 from 36) -> (143) HTTP/1.1 200 Script output follows\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   569
  write(23 from 23) -> (120) Server: badhttpserver\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   570
  write(37 from 37) -> (83) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   571
  write(41 from 41) -> (42) Content-Type: application/mercurial-0.2\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   572
  write(28 from 28) -> (14) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   573
  write(2 from 2) -> (12) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   574
  write(6 from 6) -> (6) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   575
  write(6 from 9) -> (0) 4\r\nnon
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   576
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   577
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   578
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   579
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   580
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   581
Server sends partial bundle2 header magic
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   582
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   583
  $ hg --config badserver.closeaftersendbytes=954 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   584
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   585
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   586
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   587
  requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   588
  abort: HTTP request error (incomplete response; expected 1 bytes got 3)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   589
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   590
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   591
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   592
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   593
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   594
  $ tail -7 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   595
  write(28 from 28) -> (23) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   596
  write(2 from 2) -> (21) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   597
  write(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   598
  write(9 from 9) -> (6) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   599
  write(6 from 9) -> (0) 4\r\nHG2
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   600
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   601
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   602
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   603
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   604
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   605
Server sends incomplete bundle2 stream params length
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   606
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   607
  $ hg --config badserver.closeaftersendbytes=963 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   608
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   609
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   610
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   611
  requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   612
  abort: HTTP request error (incomplete response; expected 1 bytes got 3)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   613
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   614
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   615
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   616
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   617
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   618
  $ tail -8 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   619
  write(28 from 28) -> (32) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   620
  write(2 from 2) -> (30) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   621
  write(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   622
  write(9 from 9) -> (15) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   623
  write(9 from 9) -> (6) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   624
  write(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   625
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   626
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   627
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   628
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   629
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   630
Servers stops after bundle2 stream params header
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   631
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   632
  $ hg --config badserver.closeaftersendbytes=966 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   633
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   634
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   635
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   636
  requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   637
  abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   638
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   639
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   640
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   641
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   642
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   643
  $ tail -8 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   644
  write(28 from 28) -> (35) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   645
  write(2 from 2) -> (33) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   646
  write(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   647
  write(9 from 9) -> (18) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   648
  write(9 from 9) -> (9) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   649
  write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   650
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   651
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   652
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   653
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   654
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   655
Server stops sending after bundle2 part header length
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   656
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   657
  $ hg --config badserver.closeaftersendbytes=975 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   658
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   659
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   660
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   661
  requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   662
  abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   663
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   664
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   665
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   666
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   667
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   668
  $ tail -9 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   669
  write(28 from 28) -> (44) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   670
  write(2 from 2) -> (42) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   671
  write(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   672
  write(9 from 9) -> (27) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   673
  write(9 from 9) -> (18) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   674
  write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   675
  write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   676
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   677
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   678
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   679
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   680
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   681
Server stops sending after bundle2 part header
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   682
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   683
  $ hg --config badserver.closeaftersendbytes=1022 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   684
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   685
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   686
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   687
  requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   688
  adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   689
  transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   690
  rollback completed
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
   691
  abort: HTTP request error (incomplete response)
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
   692
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   693
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   694
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   695
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   696
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   697
  $ tail -10 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   698
  write(28 from 28) -> (91) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   699
  write(2 from 2) -> (89) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   700
  write(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   701
  write(9 from 9) -> (74) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   702
  write(9 from 9) -> (65) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   703
  write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   704
  write(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   705
  write(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02	\x01version02nbchanges1\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   706
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   707
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   708
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   709
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   710
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   711
Server stops after bundle2 part payload chunk size
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   712
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   713
  $ hg --config badserver.closeaftersendbytes=1031 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   714
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   715
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   716
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   717
  requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   718
  adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   719
  transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   720
  rollback completed
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
   721
  abort: HTTP request error (incomplete response)
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
   722
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   723
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   724
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   725
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   726
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   727
  $ tail -11 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   728
  write(28 from 28) -> (100) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   729
  write(2 from 2) -> (98) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   730
  write(6 from 6) -> (92) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   731
  write(9 from 9) -> (83) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   732
  write(9 from 9) -> (74) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   733
  write(9 from 9) -> (65) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   734
  write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   735
  write(47 from 47) -> (9) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02	\x01version02nbchanges1\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   736
  write(9 from 9) -> (0) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   737
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   738
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   739
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   740
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   741
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   742
Server stops sending in middle of bundle2 payload chunk
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   743
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   744
  $ hg --config badserver.closeaftersendbytes=1504 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   745
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   746
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   747
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   748
  requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   749
  adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   750
  transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   751
  rollback completed
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
   752
  abort: HTTP request error (incomplete response)
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
   753
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   754
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   755
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   756
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   757
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   758
  $ tail -12 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   759
  write(28 from 28) -> (573) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   760
  write(2 from 2) -> (571) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   761
  write(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   762
  write(9 from 9) -> (556) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   763
  write(9 from 9) -> (547) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   764
  write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   765
  write(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   766
  write(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02	\x01version02nbchanges1\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   767
  write(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   768
  write(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   769
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   770
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   771
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   772
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   773
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   774
Server stops sending after 0 length payload chunk size
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   775
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   776
  $ hg --config badserver.closeaftersendbytes=1513 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   777
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   778
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   779
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   780
  requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   781
  adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   782
  adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   783
  adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   784
  added 1 changesets with 1 changes to 1 files
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   785
  transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   786
  rollback completed
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   787
  abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
   788
  (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   789
  [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   790
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   791
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   792
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   793
  $ tail -13 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   794
  write(28 from 28) -> (582) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   795
  write(2 from 2) -> (580) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   796
  write(6 from 6) -> (574) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   797
  write(9 from 9) -> (565) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   798
  write(9 from 9) -> (556) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   799
  write(9 from 9) -> (547) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   800
  write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   801
  write(47 from 47) -> (491) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02	\x01version02nbchanges1\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   802
  write(9 from 9) -> (482) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   803
  write(473 from 473) -> (9) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   804
  write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   805
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   806
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   807
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   808
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   809
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   810
Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   811
This is before the 0 size chunked transfer part that signals end of HTTP response.
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   812
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   813
  $ hg --config badserver.closeaftersendbytes=1710 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   814
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   815
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   816
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   817
  requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   818
  adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   819
  adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   820
  adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   821
  added 1 changesets with 1 changes to 1 files
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   822
  updating to branch default
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   823
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   824
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   825
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   826
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   827
  $ tail -22 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   828
  write(28 from 28) -> (779) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   829
  write(2 from 2) -> (777) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   830
  write(6 from 6) -> (771) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   831
  write(9 from 9) -> (762) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   832
  write(9 from 9) -> (753) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   833
  write(9 from 9) -> (744) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   834
  write(9 from 9) -> (735) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   835
  write(47 from 47) -> (688) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02	\x01version02nbchanges1\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   836
  write(9 from 9) -> (679) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   837
  write(473 from 473) -> (206) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   838
  write(9 from 9) -> (197) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   839
  write(9 from 9) -> (188) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   840
  write(38 from 38) -> (150) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00	\x06namespacephases\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   841
  write(9 from 9) -> (141) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   842
  write(64 from 64) -> (77) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c	1\npublishing	True\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   843
  write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   844
  write(9 from 9) -> (59) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   845
  write(41 from 41) -> (18) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00		namespacebookmarks\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   846
  write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   847
  write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   848
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   849
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   850
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   851
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   852
  $ rm -rf clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   853
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   854
Server sends a size 0 chunked-transfer size without terminating \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   855
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   856
  $ hg --config badserver.closeaftersendbytes=1713 serve -p $HGPORT -d --pid-file=hg.pid -E error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   857
  $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   858
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   859
  $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   860
  requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   861
  adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   862
  adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   863
  adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   864
  added 1 changesets with 1 changes to 1 files
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   865
  updating to branch default
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   866
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   867
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   868
  $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   869
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   870
  $ tail -23 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   871
  write(28 from 28) -> (782) Transfer-Encoding: chunked\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   872
  write(2 from 2) -> (780) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   873
  write(6 from 6) -> (774) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   874
  write(9 from 9) -> (765) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   875
  write(9 from 9) -> (756) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   876
  write(9 from 9) -> (747) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   877
  write(9 from 9) -> (738) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   878
  write(47 from 47) -> (691) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02	\x01version02nbchanges1\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   879
  write(9 from 9) -> (682) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   880
  write(473 from 473) -> (209) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   881
  write(9 from 9) -> (200) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   882
  write(9 from 9) -> (191) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   883
  write(38 from 38) -> (153) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00	\x06namespacephases\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   884
  write(9 from 9) -> (144) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   885
  write(64 from 64) -> (80) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c	1\npublishing	True\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   886
  write(9 from 9) -> (71) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   887
  write(9 from 9) -> (62) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   888
  write(41 from 41) -> (21) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00		namespacebookmarks\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   889
  write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   890
  write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   891
  write(3 from 5) -> (0) 0\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   892
  write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   893
  write(27) -> 15\r\nInternal Server Error\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   894
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   895
  $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   896
  $ rm -rf clone