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

« back to all changes in this revision

Viewing changes to tests/data/test547

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