tests/test-http-bad-server.t
changeset 48620 c5f734ef0b15
parent 48619 e5313a1e0a26
child 48621 b38a15822208
equal deleted inserted replaced
48619:e5313a1e0a26 48620:c5f734ef0b15
   351   $ rm -f error.log
   351   $ rm -f error.log
   352 
   352 
   353 Server sends incomplete headers for batch request
   353 Server sends incomplete headers for batch request
   354 -------------------------------------------------
   354 -------------------------------------------------
   355 
   355 
   356   $ hg serve --config badserver.close-after-send-bytes=709 -p $HGPORT -d --pid-file=hg.pid -E error.log
   356   $ hg serve \
       
   357   > --config badserver.close-after-send-patterns='(.*Content-Type: applicat){2}' \
       
   358   > -p $HGPORT -d --pid-file=hg.pid -E error.log
   357   $ cat hg.pid > $DAEMON_PIDS
   359   $ cat hg.pid > $DAEMON_PIDS
   358 
   360 
   359 TODO this output is horrible
   361 TODO this output is horrible
   360 
   362 
   361   $ hg clone http://localhost:$HGPORT/ clone
   363   $ hg clone http://localhost:$HGPORT/ clone
   373   readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
   375   readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
   374   readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
   376   readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
   375   readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
   377   readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
   376   readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
   378   readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
   377   readline(*) -> (2) \r\n (glob)
   379   readline(*) -> (2) \r\n (glob)
   378   sendall(160 from 160) -> (549) 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 !)
   380   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 !)
   379   sendall(431 from 431) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
   381   sendall(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
   380   write(160 from 160) -> (568) 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 !)
   382   write(160) -> (568) 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 !)
   381   write(431 from 431) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
   383   write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
   382   write(36 from 36) -> (673) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
   384   write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !)
   383   write(23 from 23) -> (650) Server: badhttpserver\r\n (no-py3 !)
   385   write(23) -> Server: badhttpserver\r\n (no-py3 !)
   384   write(37 from 37) -> (613) Date: $HTTP_DATE$\r\n (no-py3 !)
   386   write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !)
   385   write(41 from 41) -> (572) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
   387   write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !)
   386   write(21 from 21) -> (551) Content-Length: 431\r\n (no-py3 !)
   388   write(21) -> Content-Length: 431\r\n (no-py3 !)
   387   write(2 from 2) -> (549) \r\n (no-py3 !)
   389   write(2) -> \r\n (no-py3 !)
   388   write(431 from 431) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
   390   write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
   389   readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   391   readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n
   390   readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
   392   readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
   391   readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
   393   readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
   392   readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
   394   readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
   393   readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
   395   readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
   395   readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
   397   readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
   396   readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
   398   readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
   397   readline(*) -> (2) \r\n (glob)
   399   readline(*) -> (2) \r\n (glob)
   398   sendall(118 from 159) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: applicat (py36 !)
   400   sendall(118 from 159) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: applicat (py36 !)
   399   write(118 from 159) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: applicat (py3 no-py36 !)
   401   write(118 from 159) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: applicat (py3 no-py36 !)
   400   write(36 from 36) -> (82) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
   402   write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !)
   401   write(23 from 23) -> (59) Server: badhttpserver\r\n (no-py3 !)
   403   write(23) -> Server: badhttpserver\r\n (no-py3 !)
   402   write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n (no-py3 !)
   404   write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !)
   403   write(22 from 41) -> (0) Content-Type: applicat (no-py3 !)
   405   write(22 from 41) -> (0) Content-Type: applicat (no-py3 !)
   404   write limit reached; closing socket
   406   write limit reached; closing socket
   405   $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob)
   407   $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob)
   406   Traceback (most recent call last):
   408   Traceback (most recent call last):
   407   Exception: connection closed after sending N bytes
   409   Exception: connection closed after sending N bytes