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