quickjs-tart

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

test233 (1851B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP proxy
      6 HTTP Basic auth
      7 HTTP proxy Basic auth
      8 followlocation
      9 </keywords>
     10 </info>
     11 #
     12 # Server-side
     13 <reply>
     14 <data>
     15 HTTP/1.1 302 OK
     16 Date: Tue, 09 Nov 2010 14:49:00 GMT
     17 Server: test-server/fake swsclose
     18 Content-Type: text/html
     19 Funny-head: yesyes
     20 Location: http://goto.second.host.now/%TESTNUMBER0002
     21 Content-Length: 8
     22 Connection: close
     23 
     24 contents
     25 </data>
     26 <data2>
     27 HTTP/1.1 200 OK
     28 Date: Tue, 09 Nov 2010 14:49:00 GMT
     29 Server: test-server/fake swsclose
     30 Content-Type: text/html
     31 Funny-head: yesyes
     32 Content-Length: 9
     33 
     34 contents
     35 </data2>
     36 
     37 <datacheck>
     38 HTTP/1.1 302 OK
     39 Date: Tue, 09 Nov 2010 14:49:00 GMT
     40 Server: test-server/fake swsclose
     41 Content-Type: text/html
     42 Funny-head: yesyes
     43 Location: http://goto.second.host.now/%TESTNUMBER0002
     44 Content-Length: 8
     45 Connection: close
     46 
     47 HTTP/1.1 200 OK
     48 Date: Tue, 09 Nov 2010 14:49:00 GMT
     49 Server: test-server/fake swsclose
     50 Content-Type: text/html
     51 Funny-head: yesyes
     52 Content-Length: 9
     53 
     54 contents
     55 </datacheck>
     56 </reply>
     57 
     58 #
     59 # Client-side
     60 <client>
     61 <server>
     62 http
     63 </server>
     64 <name>
     65 HTTP, proxy, site+proxy auth and Location: to new host
     66 </name>
     67 <command>
     68 http://first.host.it.is/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this --location
     69 </command>
     70 <features>
     71 proxy
     72 </features>
     73 </client>
     74 
     75 #
     76 # Verify data after the test has been "shot"
     77 <verify>
     78 <protocol>
     79 GET http://first.host.it.is/we/want/that/page/%TESTNUMBER HTTP/1.1
     80 Host: first.host.it.is
     81 Proxy-Authorization: Basic %b64[testing:this]b64%
     82 Authorization: Basic %b64[iam:myself]b64%
     83 User-Agent: curl/%VERSION
     84 Accept: */*
     85 Proxy-Connection: Keep-Alive
     86 
     87 GET http://goto.second.host.now/%TESTNUMBER0002 HTTP/1.1
     88 Host: goto.second.host.now
     89 Proxy-Authorization: Basic %b64[testing:this]b64%
     90 User-Agent: curl/%VERSION
     91 Accept: */*
     92 Proxy-Connection: Keep-Alive
     93 
     94 </protocol>
     95 </verify>
     96 </testcase>