Imported Upstream version 7.48.0
[platform/upstream/curl.git] / tests / data / test176
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP POST
6 HTTP NTLM auth
7 </keywords>
8 </info>
9
10 # Server-side
11 <reply>
12 # the first request has NTLM type-1 included, and then the 1001 is returned
13 <data1001>
14 HTTP/1.1 200 beng swsclose swsbounce\r
15 Server: Microsoft-IIS/6.0\r
16 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth\r
17 Content-Type: text/html; charset=iso-8859-1\r
18 \r
19 </data1001>
20
21 # the second request should be auth-less and then this is returned.
22 <data>
23 HTTP/1.1 200 moo swsclose\r
24 Server: Microsoft-IIS/6.0\r
25 Content-Type: text/html; charset=iso-8859-1\r
26 Content-Length: 16\r
27 \r
28 content for you
29 </data>
30
31 <datacheck>
32 HTTP/1.1 200 beng swsclose swsbounce\r
33 Server: Microsoft-IIS/6.0\r
34 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth\r
35 Content-Type: text/html; charset=iso-8859-1\r
36 \r
37 HTTP/1.1 200 moo swsclose\r
38 Server: Microsoft-IIS/6.0\r
39 Content-Type: text/html; charset=iso-8859-1\r
40 Content-Length: 16\r
41 \r
42 content for you
43 </datacheck>
44
45 </reply>
46
47 # Client-side
48 <client>
49 <features>
50 NTLM
51 !SSPI
52 </features>
53 <server>
54 http
55 </server>
56  <name>
57 HTTP POST --ntlm to server not requiring any auth at all
58  </name>
59  <command>
60 http://%HOSTIP:%HTTPPORT/176 -u auser:apasswd --ntlm -d "junkelijunk"
61 </command>
62 </client>
63
64 # Verify data after the test has been "shot"
65 <verify>
66 <strip>
67 ^User-Agent:.*
68 </strip>
69 <protocol nonewline="yes">
70 POST /176 HTTP/1.1\r
71 Host: %HOSTIP:%HTTPPORT\r
72 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
73 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6\r
74 Accept: */*\r
75 Content-Length: 0\r
76 Content-Type: application/x-www-form-urlencoded\r
77 \r
78 POST /176 HTTP/1.1\r
79 Host: %HOSTIP:%HTTPPORT\r
80 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6\r
81 Accept: */*\r
82 Content-Length: 11\r
83 Content-Type: application/x-www-form-urlencoded\r
84 \r
85 junkelijunk
86 </protocol>
87 </verify>
88 </testcase>