quickjs-tart

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

test1524 (1130B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP PUT
      6 followlocation
      7 </keywords>
      8 </info>
      9 #
     10 # Server-side
     11 <reply>
     12 <data>
     13 HTTP/1.1 303 OK swsclose
     14 Location: moo.html&testcase=/%TESTNUMBER0002
     15 Connection: close
     16 
     17 </data>
     18 <data2>
     19 HTTP/1.1 200 OK swsclose
     20 Location: this should be ignored
     21 Connection: close
     22 
     23 body
     24 </data2>
     25 <datacheck>
     26 HTTP/1.1 303 OK swsclose
     27 Location: moo.html&testcase=/%TESTNUMBER0002
     28 Connection: close
     29 
     30 HTTP/1.1 200 OK swsclose
     31 Location: this should be ignored
     32 Connection: close
     33 
     34 body
     35 </datacheck>
     36 </reply>
     37 
     38 #
     39 # Client-side
     40 <client>
     41 <server>
     42 http
     43 </server>
     44 <name>
     45 HTTP PUT with 303 redirect
     46 </name>
     47 <command>
     48 http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -T %LOGDIR/upload%TESTNUMBER.txt
     49 </command>
     50 <file name="%LOGDIR/upload%TESTNUMBER.txt">
     51 moo
     52 </file>
     53 </client>
     54 
     55 #
     56 # Verify data after the test has been "shot"
     57 <verify>
     58 <protocol nonewline="yes">
     59 PUT /blah/%TESTNUMBER HTTP/1.1
     60 Host: %HOSTIP:%HTTPPORT
     61 User-Agent: curl/%VERSION
     62 Accept: */*
     63 Content-Length: 4
     64 
     65 moo
     66 GET /blah/moo.html&testcase=/%TESTNUMBER0002 HTTP/1.1
     67 Host: %HOSTIP:%HTTPPORT
     68 User-Agent: curl/%VERSION
     69 Accept: */*
     70 
     71 
     72 </protocol>
     73 </verify>
     74 </testcase>