quickjs-tart

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

test1054 (1386B)


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