quickjs-tart

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

test1081 (1624B)


      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/%TESTNUMBER0099.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 <data2 nocheck="yes">
     23 HTTP/1.1 200 Followed here fine swsclose
     24 Date: Tue, 09 Nov 2010 14:49:00 GMT
     25 Server: test-server/fake
     26 Content-Length: 41
     27 
     28 This second URL does not have a location
     29 </data2>
     30 </reply>
     31 
     32 # Client-side
     33 <client>
     34 <server>
     35 http
     36 </server>
     37 <name>
     38 HTTP no Location: on second URL 'redirect_url' check
     39 </name>
     40 <command>
     41 http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER0002 -w '%{redirect_url}\n'
     42 </command>
     43 </client>
     44 
     45 # Verify data after the test has been "shot"
     46 <verify>
     47 <protocol>
     48 GET /we/want/our/%TESTNUMBER HTTP/1.1
     49 Host: %HOSTIP:%HTTPPORT
     50 User-Agent: curl/%VERSION
     51 Accept: */*
     52 
     53 GET /we/want/our/%TESTNUMBER0002 HTTP/1.1
     54 Host: %HOSTIP:%HTTPPORT
     55 User-Agent: curl/%VERSION
     56 Accept: */*
     57 
     58 </protocol>
     59 <stdout>
     60 HTTP/1.1 301 This is a weirdo text message swsclose
     61 Location: data/%TESTNUMBER0099.txt?coolsite=yes
     62 Content-Length: 62
     63 Connection: close
     64 
     65 This server reply is for testing a simple Location: following
     66 http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0099.txt?coolsite=yes
     67 HTTP/1.1 200 Followed here fine swsclose
     68 Date: Tue, 09 Nov 2010 14:49:00 GMT
     69 Server: test-server/fake
     70 Content-Length: 41
     71 
     72 This second URL does not have a location
     73 
     74 </stdout>
     75 </verify>
     76 </testcase>