Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / tests / data / test257
blobc76142c7617ab3cca521250f7d9e91b82ba2a832
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 followlocation
7 netrc
8 </keywords>
9 </info>
10 # Server-side
11 <reply>
12 <data>
13 HTTP/1.1 301 This is a weirdo text message swsclose
14 Date: Thu, 09 Nov 2010 14:49:00 GMT
15 Server: test-server/fake
16 Location: http://anotherone.com/2570002
17 Connection: close
19 This server reply is for testing a simple Location: following
21 </data>
22 <data2>
23 HTTP/1.1 302 Followed here fine swsclose
24 Date: Thu, 09 Nov 2010 14:49:00 GMT
25 Server: test-server/fake
26 Location: http://athird.com/2570003
28 If this is received, the location following worked
30 </data2>
31 <data3>
32 HTTP/1.1 200 Followed here fine swsclose
33 Date: Thu, 09 Nov 2010 14:49:00 GMT
34 Server: test-server/fake
35 Content-Length: 52
37 If this is received, the location following worked
39 </data3>
40 <datacheck>
41 HTTP/1.1 301 This is a weirdo text message swsclose
42 Date: Thu, 09 Nov 2010 14:49:00 GMT
43 Server: test-server/fake
44 Location: http://anotherone.com/2570002
45 Connection: close
47 HTTP/1.1 302 Followed here fine swsclose
48 Date: Thu, 09 Nov 2010 14:49:00 GMT
49 Server: test-server/fake
50 Location: http://athird.com/2570003
52 HTTP/1.1 200 Followed here fine swsclose
53 Date: Thu, 09 Nov 2010 14:49:00 GMT
54 Server: test-server/fake
55 Content-Length: 52
57 If this is received, the location following worked
59 </datacheck>
60 </reply>
62 # Client-side
63 <client>
64 <features>
65 netrc_debug
66 </features>
67 <server>
68 http
69 </server>
70  <name>
71 HTTP Location: following with --netrc-optional
72  </name>
73  <command>
74 http://supersite.com/want/257 -L -x http://%HOSTIP:%HTTPPORT --netrc-optional
75 </command>
77 # netrc auth for two out of three sites:
78 <file name="log/netrc">
79 machine supersite.com login user1 password passwd1
80 machine anotherone.com login user2 password passwd2
81 </file>
82 </client>
84 # Verify data after the test has been "shot"
85 <verify>
86 <strip>
87 ^User-Agent:.*
88 </strip>
89 <protocol>
90 GET http://supersite.com/want/257 HTTP/1.1
91 Authorization: Basic dXNlcjE6cGFzc3dkMQ==
92 User-Agent: curl/7.14.0-CVS (i686-pc-linux-gnu) libcurl/7.14.0-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
93 Host: supersite.com
94 Pragma: no-cache
95 Accept: */*
96 Proxy-Connection: Keep-Alive
98 GET http://anotherone.com/2570002 HTTP/1.1
99 Authorization: Basic dXNlcjI6cGFzc3dkMg==
100 User-Agent: curl/7.14.0-CVS (i686-pc-linux-gnu) libcurl/7.14.0-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
101 Host: anotherone.com
102 Pragma: no-cache
103 Accept: */*
104 Proxy-Connection: Keep-Alive
106 GET http://athird.com/2570003 HTTP/1.1
107 User-Agent: curl/7.14.0-CVS (i686-pc-linux-gnu) libcurl/7.14.0-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
108 Host: athird.com
109 Pragma: no-cache
110 Accept: */*
111 Proxy-Connection: Keep-Alive
113 </protocol>
114 </verify>
115 </testcase>