xref: /curl/tests/data/test998 (revision 9bee39bf)
1<testcase>
2<info>
3<keywords>
4HTTP
5--location-trusted
6</keywords>
7</info>
8
9#
10# Server-side
11<reply>
12<data>
13HTTP/1.1 301 redirect
14Date: Tue, 09 Nov 2010 14:49:00 GMT
15Server: test-server/fake
16Content-Length: 0
17Connection: close
18Content-Type: text/html
19Location: http://somewhere.else.example/a/path/%TESTNUMBER0002
20
21</data>
22<data2>
23HTTP/1.1 200 OK
24Date: Tue, 09 Nov 2010 14:49:00 GMT
25Content-Length: 6
26Content-Type: text/html
27Funny-head: yesyes
28
29-foo-
30</data2>
31
32<datacheck>
33HTTP/1.1 301 redirect
34Date: Tue, 09 Nov 2010 14:49:00 GMT
35Server: test-server/fake
36Content-Length: 0
37Connection: close
38Content-Type: text/html
39Location: http://somewhere.else.example/a/path/%TESTNUMBER0002
40
41HTTP/1.1 200 OK
42Date: Tue, 09 Nov 2010 14:49:00 GMT
43Content-Length: 6
44Content-Type: text/html
45Funny-head: yesyes
46
47-foo-
48</datacheck>
49
50</reply>
51
52#
53# Client-side
54<client>
55<features>
56proxy
57</features>
58<server>
59http
60</server>
61<name>
62HTTP with auth in URL redirected to another host
63</name>
64<command>
65-x %HOSTIP:%HTTPPORT http://alberto:einstein@somwhere.example/%TESTNUMBER --location-trusted
66</command>
67</client>
68
69#
70# Verify data after the test has been "shot"
71<verify>
72<strip>
73QUIT
74</strip>
75<protocol>
76GET http://somwhere.example/998 HTTP/1.1
77Host: somwhere.example
78Authorization: Basic YWxiZXJ0bzplaW5zdGVpbg==
79User-Agent: curl/%VERSION
80Accept: */*
81Proxy-Connection: Keep-Alive
82
83GET http://somewhere.else.example/a/path/9980002 HTTP/1.1
84Host: somewhere.else.example
85Authorization: Basic YWxiZXJ0bzplaW5zdGVpbg==
86User-Agent: curl/%VERSION
87Accept: */*
88Proxy-Connection: Keep-Alive
89
90</protocol>
91</verify>
92</testcase>
93