quickjs-tart

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

test1332 (1405B)


      1 <testcase>
      2 # test case cloned from 1076 and then 302 was replaced with 303
      3 <info>
      4 <keywords>
      5 HTTP
      6 HTTP POST
      7 followlocation
      8 </keywords>
      9 </info>
     10 #
     11 # Server-side
     12 <reply>
     13 <data>
     14 HTTP/1.1 303 OK swsclose
     15 Location: moo.html&testcase=/%TESTNUMBER0002
     16 Date: Tue, 09 Nov 2010 14:49:00 GMT
     17 Connection: close
     18 
     19 </data>
     20 <data2>
     21 HTTP/1.1 200 OK swsclose
     22 Location: this should be ignored
     23 Date: Tue, 09 Nov 2010 14:49:00 GMT
     24 Connection: close
     25 
     26 body
     27 </data2>
     28 <datacheck>
     29 HTTP/1.1 303 OK swsclose
     30 Location: moo.html&testcase=/%TESTNUMBER0002
     31 Date: Tue, 09 Nov 2010 14:49:00 GMT
     32 Connection: close
     33 
     34 HTTP/1.1 200 OK swsclose
     35 Location: this should be ignored
     36 Date: Tue, 09 Nov 2010 14:49:00 GMT
     37 Connection: close
     38 
     39 body
     40 </datacheck>
     41 </reply>
     42 
     43 #
     44 # Client-side
     45 <client>
     46 <server>
     47 http
     48 </server>
     49 <name>
     50 HTTP POST with 303 redirect and --post303
     51 </name>
     52 <command>
     53 http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -d "moo" --post303
     54 </command>
     55 </client>
     56 
     57 #
     58 # Verify data after the test has been "shot"
     59 <verify>
     60 <protocol nonewline="yes">
     61 POST /blah/%TESTNUMBER HTTP/1.1
     62 Host: %HOSTIP:%HTTPPORT
     63 User-Agent: curl/%VERSION
     64 Accept: */*
     65 Content-Length: 3
     66 Content-Type: application/x-www-form-urlencoded
     67 
     68 mooPOST /blah/moo.html&testcase=/%TESTNUMBER0002 HTTP/1.1
     69 Host: %HOSTIP:%HTTPPORT
     70 User-Agent: curl/%VERSION
     71 Accept: */*
     72 Content-Length: 3
     73 Content-Type: application/x-www-form-urlencoded
     74 
     75 moo
     76 </protocol>
     77 </verify>
     78 </testcase>