tests/test-http-bad-server.t
changeset 48619 e5313a1e0a26
parent 48615 e38776a4c2cb
child 48620 c5f734ef0b15
equal deleted inserted replaced
48618:9dc00c5617ea 48619:e5313a1e0a26
   310   $ rm -f error.log
   310   $ rm -f error.log
   311 
   311 
   312 Server sends an incomplete capabilities response body
   312 Server sends an incomplete capabilities response body
   313 -----------------------------------------------------
   313 -----------------------------------------------------
   314 
   314 
   315   $ hg serve --config badserver.close-after-send-bytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
   315   $ hg serve \
       
   316   > --config badserver.close-after-send-patterns='batch branchmap bund' \
       
   317   > -p $HGPORT -d --pid-file=hg.pid -E error.log
   316   $ cat hg.pid > $DAEMON_PIDS
   318   $ cat hg.pid > $DAEMON_PIDS
   317 
   319 
   318   $ hg clone http://localhost:$HGPORT/ clone
   320   $ hg clone http://localhost:$HGPORT/ clone
   319   abort: HTTP request error (incomplete response; expected 431 bytes got 20)
   321   abort: HTTP request error (incomplete response; expected 431 bytes got 20)
   320   (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
   322   (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
   327   readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
   329   readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
   328   readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
   330   readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
   329   readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
   331   readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
   330   readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
   332   readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
   331   readline(*) -> (2) \r\n (glob)
   333   readline(*) -> (2) \r\n (glob)
   332   sendall(160 from 160) -> (20) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py36 !)
   334   sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py36 !)
   333   sendall(20 from 431) -> (0) batch branchmap bund (py36 !)
   335   sendall(20 from 431) -> (0) batch branchmap bund (py36 !)
   334   write(160 from 160) -> (20) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !)
   336   write(160) -> (20) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !)
   335   write(20 from 431) -> (0) batch branchmap bund (py3 no-py36 !)
   337   write(20 from 431) -> (0) batch branchmap bund (py3 no-py36 !)
   336   write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
   338   write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !)
   337   write(23 from 23) -> (121) Server: badhttpserver\r\n (no-py3 !)
   339   write(23) -> Server: badhttpserver\r\n (no-py3 !)
   338   write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n (no-py3 !)
   340   write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !)
   339   write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
   341   write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !)
   340   write(21 from 21) -> (22) Content-Length: 431\r\n (no-py3 !)
   342   write(21) -> Content-Length: 431\r\n (no-py3 !)
   341   write(2 from 2) -> (20) \r\n (no-py3 !)
   343   write(2) -> \r\n (no-py3 !)
   342   write(20 from 431) -> (0) batch branchmap bund (no-py3 !)
   344   write(20 from 431) -> (0) batch branchmap bund (no-py3 !)
   343   write limit reached; closing socket
   345   write limit reached; closing socket
   344   $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=capabilities': (glob)
   346   $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=capabilities': (glob)
   345   Traceback (most recent call last):
   347   Traceback (most recent call last):
   346   Exception: connection closed after sending N bytes
   348   Exception: connection closed after sending N bytes