quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test357 (1470B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP PUT
      6 Expect: 100-continue
      7 </keywords>
      8 </info>
      9 # Server-side
     10 <reply>
     11 # 417 means the server didn't like the Expect header
     12 <data>
     13 HTTP/1.1 417 BAD swsbounce
     14 Date: Tue, 09 Nov 2010 14:49:00 GMT
     15 Server: test-server/fake
     16 Content-Length: 0
     17 
     18 </data>
     19 <data1>
     20 HTTP/1.1 200 OK
     21 Date: Tue, 09 Nov 2010 14:49:00 GMT
     22 Server: test-server/fake
     23 Content-Length: 10
     24 
     25 blablabla
     26 </data1>
     27 <datacheck>
     28 HTTP/1.1 417 BAD swsbounce
     29 Date: Tue, 09 Nov 2010 14:49:00 GMT
     30 Server: test-server/fake
     31 Content-Length: 0
     32 
     33 HTTP/1.1 200 OK
     34 Date: Tue, 09 Nov 2010 14:49:00 GMT
     35 Server: test-server/fake
     36 Content-Length: 10
     37 
     38 blablabla
     39 </datacheck>
     40 <servercmd>
     41 no-expect
     42 </servercmd>
     43 </reply>
     44 
     45 # Client-side
     46 <client>
     47 <server>
     48 http
     49 </server>
     50 <name>
     51 HTTP PUT with Expect: 100-continue and 417 response
     52 </name>
     53 <command>
     54 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -T %LOGDIR/test%TESTNUMBER.txt --expect100-timeout 99
     55 </command>
     56 # 1053700 x 'x', large enough to invoke the 100-continue behaviour
     57 <file name="%LOGDIR/test%TESTNUMBER.txt">
     58 %repeat[1053700 x x]%
     59 </file>
     60 </client>
     61 
     62 # Verify data after the test has been "shot"
     63 <verify>
     64 <protocol>
     65 PUT /we/want/%TESTNUMBER HTTP/1.1
     66 Host: %HOSTIP:%HTTPPORT
     67 User-Agent: curl/%VERSION
     68 Accept: */*
     69 Content-Length: 1053701
     70 Expect: 100-continue
     71 
     72 PUT /we/want/%TESTNUMBER HTTP/1.1
     73 Host: %HOSTIP:%HTTPPORT
     74 User-Agent: curl/%VERSION
     75 Accept: */*
     76 Content-Length: 1053701
     77 
     78 %repeat[1053700 x x]%
     79 </protocol>
     80 </verify>
     81 </testcase>