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

« back to all changes in this revision

Viewing changes to tests/data/test548

  • 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 POST
 
6
HTTP proxy NTLM auth
 
7
</keywords>
 
8
</info>
 
9
# Server-side
 
10
<reply>
 
11
 
 
12
<data>
 
13
HTTP/1.1 407 Authorization Required swsclose
 
14
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
 
15
Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
 
16
Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
 
17
Proxy-Authenticate: NTLM
 
18
Content-Type: text/html; charset=iso-8859-1
 
19
Connection: close
 
20
 
 
21
This is not the real page
 
22
</data>
 
23
 
 
24
# this is returned first since we get no proxy-auth
 
25
<data1001>
 
26
HTTP/1.1 407 Authorization Required to proxy me my dear
 
27
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
 
28
Content-Length: 34
 
29
 
 
30
Hey you, authenticate or go away!
 
31
</data1001>
 
32
 
 
33
# This is supposed to be returned when the server gets the second
 
34
# Authorization: NTLM line passed-in from the client
 
35
<data1002>
 
36
HTTP/1.1 200 Things are fine in proxy land swsclose
 
37
Server: Microsoft-IIS/5.0
 
38
Content-Type: text/html; charset=iso-8859-1
 
39
Content-Length: 42
 
40
 
 
41
Contents of that page you requested, sir.
 
42
</data1002>
 
43
 
 
44
<datacheck>
 
45
HTTP/1.1 407 Authorization Required swsclose
 
46
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
 
47
Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
 
48
Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
 
49
Proxy-Authenticate: NTLM
 
50
Content-Type: text/html; charset=iso-8859-1
 
51
Connection: close
 
52
 
 
53
HTTP/1.1 407 Authorization Required to proxy me my dear
 
54
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
 
55
Content-Length: 34
 
56
 
 
57
HTTP/1.1 200 Things are fine in proxy land swsclose
 
58
Server: Microsoft-IIS/5.0
 
59
Content-Type: text/html; charset=iso-8859-1
 
60
Content-Length: 42
 
61
 
 
62
Contents of that page you requested, sir.
 
63
</datacheck>
 
64
</reply>
 
65
 
 
66
# Client-side
 
67
<client>
 
68
<server>
 
69
http
 
70
</server>
 
71
# tool to use
 
72
<tool>
 
73
lib548
 
74
</tool>
 
75
<features>
 
76
NTLM
 
77
</features>
 
78
 <name>
 
79
HTTP proxy auth NTLM with POST data from CURLOPT_POSTFIELDS
 
80
 </name>
 
81
 <command>
 
82
http://test.remote.server.com/path/548 http://%HOSTIP:%HTTPPORT s1lly:pers0n
 
83
</command>
 
84
</client>
 
85
 
 
86
# Verify data after the test has been "shot"
 
87
<verify>
 
88
<strip>
 
89
^User-Agent: curl/.*
 
90
</strip>
 
91
# We strip off a large chunk of the type-2 NTLM message since it depends on
 
92
# the local host name and thus differs on different machines!
 
93
<strippart>
 
94
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
 
95
</strippart>
 
96
<protocol>
 
97
POST http://test.remote.server.com/path/548 HTTP/1.1
 
98
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
 
99
Host: test.remote.server.com
 
100
Pragma: no-cache
 
101
Accept: */*
 
102
Proxy-Connection: Keep-Alive
 
103
Content-Length: 36
 
104
Content-Type: application/x-www-form-urlencoded
 
105
 
 
106
this is the blurb we want to upload
 
107
POST http://test.remote.server.com/path/548 HTTP/1.1
 
108
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
 
109
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
 
110
Host: test.remote.server.com
 
111
Pragma: no-cache
 
112
Accept: */*
 
113
Proxy-Connection: Keep-Alive
 
114
Content-Length: 0
 
115
Content-Type: application/x-www-form-urlencoded
 
116
 
 
117
POST http://test.remote.server.com/path/548 HTTP/1.1
 
118
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
 
119
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
 
120
Host: test.remote.server.com
 
121
Pragma: no-cache
 
122
Accept: */*
 
123
Proxy-Connection: Keep-Alive
 
124
Content-Length: 36
 
125
Content-Type: application/x-www-form-urlencoded
 
126
 
 
127
this is the blurb we want to upload
 
128
</protocol>
 
129
</verify>
 
130
</testcase>