~ubuntu-branches/ubuntu/lucid/curl/lucid-201101212007

« back to all changes in this revision

Viewing changes to tests/data/test1021

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-02-08 11:20:41 UTC
  • mto: (3.1.1 lenny) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20080208112041-hed7sb5r6ghmjf8v
Tags: upstream-7.18.0
ImportĀ upstreamĀ versionĀ 7.18.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<testcase>
 
2
<info>
 
3
<keywords>
 
4
HTTP
 
5
HTTP GET
 
6
HTTP proxy
 
7
HTTP proxy NTLM auth
 
8
CONNECT
 
9
</keywords>
 
10
</info>
 
11
# Server-side
 
12
<reply>
 
13
 
 
14
<data>
 
15
HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
 
16
Proxy-Authenticate: NTLM
 
17
Content-Length: 21
 
18
Connection: close
 
19
 
 
20
data to discard
 
21
</data>
 
22
 
 
23
# this is returned first since we get no proxy-auth
 
24
<data1001>
 
25
HTTP/1.1 407 Authorization Required to proxy me my dear
 
26
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
 
27
Content-Length: 28
 
28
 
 
29
And you should ignore this data.
 
30
</data1001>
 
31
 
 
32
# This is supposed to be returned when the server gets the second
 
33
# Authorization: NTLM line passed-in from the client
 
34
<data1002>
 
35
HTTP/1.1 200 Things are fine in proxy land
 
36
Server: Microsoft-IIS/5.0
 
37
Content-Type: text/html; charset=iso-8859-1
 
38
 
 
39
</data1002>
 
40
 
 
41
# this is returned when we get a GET!
 
42
<data2>
 
43
HTTP/1.1 200 OK
 
44
Date: Thu, 09 Nov 2010 14:49:00 GMT
 
45
Content-Length: 7
 
46
Connection: close
 
47
Content-Type: text/html
 
48
Funny-head: yesyes
 
49
 
 
50
daniel
 
51
</data2>
 
52
 
 
53
# then this is returned when we get proxy-auth
 
54
<data1000>
 
55
HTTP/1.1 200 OK swsbounce
 
56
Server: no
 
57
 
 
58
Nice proxy auth sir!
 
59
</data1000>
 
60
 
 
61
<datacheck>
 
62
HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
 
63
Proxy-Authenticate: NTLM
 
64
Content-Length: 21
 
65
Connection: close
 
66
 
 
67
HTTP/1.1 407 Authorization Required to proxy me my dear
 
68
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
 
69
Content-Length: 28
 
70
 
 
71
HTTP/1.1 200 Things are fine in proxy land
 
72
Server: Microsoft-IIS/5.0
 
73
Content-Type: text/html; charset=iso-8859-1
 
74
 
 
75
HTTP/1.1 200 OK
 
76
Date: Thu, 09 Nov 2010 14:49:00 GMT
 
77
Content-Length: 7
 
78
Connection: close
 
79
Content-Type: text/html
 
80
Funny-head: yesyes
 
81
 
 
82
daniel
 
83
</datacheck>
 
84
</reply>
 
85
 
 
86
# Client-side
 
87
<client>
 
88
<server>
 
89
http
 
90
</server>
 
91
<features>
 
92
NTLM
 
93
</features>
 
94
 <name>
 
95
HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close
 
96
 </name>
 
97
 <command>
 
98
http://test.remote.server.com:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel
 
99
</command>
 
100
</client>
 
101
 
 
102
# Verify data after the test has been "shot"
 
103
<verify>
 
104
<strip>
 
105
^User-Agent: curl/.*
 
106
</strip>
 
107
# We strip off a large chunk of the type-2 NTLM message since it depends on
 
108
# the local host name and thus differs on different machines!
 
109
<strippart>
 
110
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
 
111
</strippart>
 
112
<protocol>
 
113
CONNECT test.remote.server.com:1021 HTTP/1.0
 
114
Host: test.remote.server.com:1021
 
115
Proxy-Connection: Keep-Alive
 
116
 
 
117
CONNECT test.remote.server.com:1021 HTTP/1.0
 
118
Host: test.remote.server.com:1021
 
119
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
 
120
Proxy-Connection: Keep-Alive
 
121
 
 
122
CONNECT test.remote.server.com:1021 HTTP/1.0
 
123
Host: test.remote.server.com:1021
 
124
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
 
125
Proxy-Connection: Keep-Alive
 
126
 
 
127
GET /path/10210002 HTTP/1.1
 
128
User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
 
129
Host: test.remote.server.com:1021
 
130
Accept: */*
 
131
 
 
132
</protocol>
 
133
</verify>
 
134
</testcase>