quickjs-tart

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

test1080 (1523B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP GET
      6 redirect_url
      7 followlocation
      8 --write-out
      9 </keywords>
     10 </info>
     11 
     12 # Server-side
     13 <reply>
     14 <data nocheck="yes">
     15 HTTP/1.1 301 This is a weirdo text message swsclose
     16 Location: data/%TESTNUMBER0002.txt?coolsite=yes
     17 Content-Length: 62
     18 Connection: close
     19 
     20 This server reply is for testing a simple Location: following
     21 </data>
     22 </reply>
     23 
     24 # Client-side
     25 <client>
     26 <server>
     27 http
     28 </server>
     29 <name>
     30 HTTP Location: on two URLs 'redirect_url' check
     31 </name>
     32 <command>
     33 http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER -w '%{redirect_url}\n'
     34 </command>
     35 </client>
     36 
     37 # Verify data after the test has been "shot"
     38 <verify>
     39 <protocol>
     40 GET /we/want/our/%TESTNUMBER HTTP/1.1
     41 Host: %HOSTIP:%HTTPPORT
     42 User-Agent: curl/%VERSION
     43 Accept: */*
     44 
     45 GET /we/want/our/%TESTNUMBER HTTP/1.1
     46 Host: %HOSTIP:%HTTPPORT
     47 User-Agent: curl/%VERSION
     48 Accept: */*
     49 
     50 </protocol>
     51 <stdout>
     52 HTTP/1.1 301 This is a weirdo text message swsclose
     53 Location: data/%TESTNUMBER0002.txt?coolsite=yes
     54 Content-Length: 62
     55 Connection: close
     56 
     57 This server reply is for testing a simple Location: following
     58 http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes
     59 HTTP/1.1 301 This is a weirdo text message swsclose
     60 Location: data/%TESTNUMBER0002.txt?coolsite=yes
     61 Content-Length: 62
     62 Connection: close
     63 
     64 This server reply is for testing a simple Location: following
     65 http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes
     66 </stdout>
     67 </verify>
     68 </testcase>