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