quickjs-tart

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

test1088 (2335B)


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