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

« back to all changes in this revision

Viewing changes to tests/data/test1100

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-05-26 18:58:51 UTC
  • mfrom: (3.3.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090526185851-t1gun9nboi5kbd9u
Tags: 7.19.5-1ubuntu1
* Merge from Debian unstable (LP: #380281), remaining changes:
  - Drop build dependencies: stunnel, libdb4.6-dev, libssh2-1-dev
  - Add build-dependency on openssh-server
  - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.
  - Call automake-1.9 with --add-missing --copy --force
* Fixes LP: #379477

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 NTLM auth
 
7
</keywords>
 
8
</info>
 
9
# Server-side
 
10
<reply>
 
11
 
 
12
<data>
 
13
HTTP/1.1 200 Thanks for this! swsclose
 
14
Content-Length: 25
 
15
 
 
16
This is the final page !
 
17
</data>
 
18
 
 
19
<data1001>
 
20
HTTP/1.1 401 Now gimme that second request of crap
 
21
Server: Microsoft-IIS/5.0
 
22
Content-Type: text/html; charset=iso-8859-1
 
23
Content-Length: 34
 
24
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
 
25
 
 
26
This is not the real page either!
 
27
</data1001>
 
28
 
 
29
# This is supposed to be returned when the server gets the second
 
30
# Authorization: NTLM line passed-in from the client
 
31
<data1002>
 
32
HTTP/1.1 302 Thanks for this, but we want to redir you!
 
33
Server: Microsoft-IIS/5.0
 
34
Content-Type: text/html; charset=iso-8859-1
 
35
Location: /1100
 
36
Content-Length: 34
 
37
 
 
38
This is not the real page either!
 
39
</data1002>
 
40
 
 
41
<datacheck>
 
42
HTTP/1.1 401 Now gimme that second request of crap
 
43
Server: Microsoft-IIS/5.0
 
44
Content-Type: text/html; charset=iso-8859-1
 
45
Content-Length: 34
 
46
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
 
47
 
 
48
HTTP/1.1 302 Thanks for this, but we want to redir you!
 
49
Server: Microsoft-IIS/5.0
 
50
Content-Type: text/html; charset=iso-8859-1
 
51
Location: /1100
 
52
Content-Length: 34
 
53
 
 
54
HTTP/1.1 200 Thanks for this! swsclose
 
55
Content-Length: 25
 
56
 
 
57
This is the final page !
 
58
</datacheck>
 
59
 
 
60
</reply>
 
61
 
 
62
# Client-side
 
63
<client>
 
64
<features>
 
65
NTLM
 
66
</features>
 
67
<server>
 
68
http
 
69
</server>
 
70
 <name>
 
71
HTTP POST with NTLM authorization and following a 302 redirect
 
72
 </name>
 
73
 <command>
 
74
http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away" 
 
75
</command>
 
76
</client>
 
77
 
 
78
# Verify data after the test has been "shot"
 
79
<verify>
 
80
<strip>
 
81
^User-Agent:.*
 
82
</strip>
 
83
# We strip off a large chunk of the type-2 NTLM message since it depends on
 
84
# the local host name and thus differs on different machines!
 
85
<strippart>
 
86
s/^(Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA).*/$1/
 
87
</strippart>
 
88
<protocol>
 
89
POST /1100 HTTP/1.1
 
90
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
 
91
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
 
92
Host: %HOSTIP:%HTTPPORT
 
93
Accept: */*
 
94
Content-Length: 0
 
95
Content-Type: application/x-www-form-urlencoded
 
96
 
 
97
POST /1100 HTTP/1.1
 
98
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
 
99
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
 
100
Host: %HOSTIP:%HTTPPORT
 
101
Accept: */*
 
102
Content-Length: 18
 
103
Content-Type: application/x-www-form-urlencoded
 
104
 
 
105
stuff to send awayGET /1100 HTTP/1.1
 
106
User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS GnuTLS/2.6.6 zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.14 libssh2/1.1
 
107
Host: %HOSTIP:%HTTPPORT
 
108
Accept: */*
 
109
 
 
110
</protocol>
 
111
</verify>
 
112
</testcase>