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