quickjs-tart

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

test1141 (1202B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP GET
      6 HTTP proxy
      7 followlocation
      8 </keywords>
      9 </info>
     10 # Server-side
     11 <reply>
     12 <data>
     13 HTTP/1.1 302 This is a weirdo text message
     14 Connection: close
     15 Location: http:///foo.example.com/want/%TESTNUMBER0001
     16 
     17 This server reply is for testing
     18 </data>
     19 <data1>
     20 HTTP/1.1 200 hello
     21 Connection: close
     22 Content-Length: 4
     23 
     24 hej
     25 </data1>
     26 <datacheck>
     27 HTTP/1.1 302 This is a weirdo text message
     28 Connection: close
     29 Location: http:///foo.example.com/want/%TESTNUMBER0001
     30 
     31 HTTP/1.1 200 hello
     32 Connection: close
     33 Content-Length: 4
     34 
     35 hej
     36 </datacheck>
     37 </reply>
     38 
     39 # Client-side
     40 <client>
     41 <server>
     42 http
     43 </server>
     44 <name>
     45 HTTP redirect to http:/// (three slashes!)
     46 </name>
     47 <command>
     48 %HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT
     49 </command>
     50 <features>
     51 proxy
     52 </features>
     53 </client>
     54 
     55 # Verify data after the test has been "shot"
     56 <verify>
     57 <protocol>
     58 GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1
     59 Host: %HOSTIP:%HTTPPORT
     60 User-Agent: curl/%VERSION
     61 Accept: */*
     62 Proxy-Connection: Keep-Alive
     63 
     64 GET http://foo.example.com/want/%TESTNUMBER0001 HTTP/1.1
     65 Host: foo.example.com
     66 User-Agent: curl/%VERSION
     67 Accept: */*
     68 Proxy-Connection: Keep-Alive
     69 
     70 </protocol>
     71 </verify>
     72 </testcase>