quickjs-tart

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

test184 (1350B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP GET
      6 HTTP proxy
      7 followlocation
      8 </keywords>
      9 </info>
     10 
     11 # Server-side
     12 <reply>
     13 <data>
     14 HTTP/1.1 301 OK swsbounce
     15 Date: Tue, 09 Nov 2010 14:49:00 GMT
     16 Content-Length: 4
     17 Location: http://yet.another.host/%TESTNUMBER
     18 
     19 moo
     20 </data>
     21 <data1>
     22 HTTP/1.1 200 OK
     23 Date: Tue, 09 Nov 2010 14:49:00 GMT
     24 Content-Length: 4
     25 
     26 moo
     27 </data1>
     28 <datacheck>
     29 HTTP/1.1 301 OK swsbounce
     30 Date: Tue, 09 Nov 2010 14:49:00 GMT
     31 Content-Length: 4
     32 Location: http://yet.another.host/%TESTNUMBER
     33 
     34 HTTP/1.1 200 OK
     35 Date: Tue, 09 Nov 2010 14:49:00 GMT
     36 Content-Length: 4
     37 
     38 moo
     39 </datacheck>
     40 </reply>
     41 
     42 # Client-side
     43 <client>
     44 <server>
     45 http
     46 </server>
     47 <name>
     48 HTTP replace Host: when following Location: to new host
     49 </name>
     50 <command>
     51 http://deathstar.another.galaxy/%TESTNUMBER -L -H "Host: another.visitor.stay.a.while.stay.foreeeeeever" --proxy http://%HOSTIP:%HTTPPORT
     52 </command>
     53 <features>
     54 proxy
     55 </features>
     56 </client>
     57 
     58 # Verify data after the test has been "shot"
     59 <verify>
     60 <protocol>
     61 GET http://deathstar.another.galaxy/%TESTNUMBER HTTP/1.1
     62 Host: another.visitor.stay.a.while.stay.foreeeeeever
     63 User-Agent: curl/%VERSION
     64 Accept: */*
     65 Proxy-Connection: Keep-Alive
     66 
     67 GET http://yet.another.host/%TESTNUMBER HTTP/1.1
     68 Host: yet.another.host
     69 User-Agent: curl/%VERSION
     70 Accept: */*
     71 Proxy-Connection: Keep-Alive
     72 
     73 </protocol>
     74 
     75 </verify>
     76 </testcase>