quickjs-tart

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

test1130 (1930B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP POST
      6 Expect: 100-continue
      7 </keywords>
      8 </info>
      9 
     10 #
     11 # Server-side
     12 <reply>
     13 <data nocheck="yes">
     14 HTTP/1.1 404 NOOOOOOOOO
     15 Date: Tue, 09 Nov 2010 14:49:00 GMT
     16 Server: test-server/fake
     17 Content-Length: 6
     18 Content-Type: text/html
     19 
     20 -foo-
     21 </data>
     22 
     23 <data1>
     24 HTTP/1.1 404 NEITHER
     25 Date: Tue, 09 Nov 2010 14:49:00 GMT
     26 Server: test-server/fake
     27 Content-Length: 6
     28 Content-Type: text/html
     29 
     30 -foo-
     31 </data1>
     32 
     33 # We use skip to make the test server never read the full payload off
     34 # the socket and instead return the response at once. In actuality, the
     35 # long --expect100-timeout means that it will never get a chance to read this.
     36 <servercmd>
     37 skip: 100
     38 </servercmd>
     39 </reply>
     40 
     41 #
     42 # Client-side
     43 <client>
     44 # 100 x 'x'
     45 <file name="%LOGDIR/file%TESTNUMBER">
     46 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     47 </file>
     48 <server>
     49 http
     50 </server>
     51 <name>
     52 HTTP POST forced expect 100-continue with a 404
     53 </name>
     54  <command option="no-output">
     55 -d @%LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -H "Expect: 100-continue" --expect100-timeout 99
     56 </command>
     57 </client>
     58 
     59 #
     60 # Verify data after the test has been "shot"
     61 <verify>
     62 <stdout>
     63 HTTP/1.1 404 NOOOOOOOOO
     64 Date: Tue, 09 Nov 2010 14:49:00 GMT
     65 Server: test-server/fake
     66 Content-Length: 6
     67 Content-Type: text/html
     68 
     69 -foo-
     70 HTTP/1.1 404 NEITHER
     71 Date: Tue, 09 Nov 2010 14:49:00 GMT
     72 Server: test-server/fake
     73 Content-Length: 6
     74 Content-Type: text/html
     75 
     76 -foo-
     77 </stdout>
     78 <protocol>
     79 POST /%TESTNUMBER HTTP/1.1
     80 Host: %HOSTIP:%HTTPPORT
     81 User-Agent: curl/%VERSION
     82 Accept: */*
     83 Expect: 100-continue
     84 Content-Length: 100
     85 Content-Type: application/x-www-form-urlencoded
     86 
     87 POST /%TESTNUMBER0001 HTTP/1.1
     88 Host: %HOSTIP:%HTTPPORT
     89 User-Agent: curl/%VERSION
     90 Accept: */*
     91 Expect: 100-continue
     92 Content-Length: 100
     93 Content-Type: application/x-www-form-urlencoded
     94 
     95 </protocol>
     96 </verify>
     97 </testcase>