Revert "Update to 7.44.0"
[platform/upstream/curl.git] / tests / data / test1100
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\r
14 Content-Length: 25\r
15 \r
16 This is the final page !
17 </data>
18
19 <data1001>
20 HTTP/1.1 401 Now gimme that second request of crap\r
21 Server: Microsoft-IIS/5.0\r
22 Content-Type: text/html; charset=iso-8859-1\r
23 Content-Length: 34\r
24 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
25 \r
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!\r
33 Server: Microsoft-IIS/5.0\r
34 Content-Type: text/html; charset=iso-8859-1\r
35 Location: /1100\r
36 Content-Length: 34\r
37 \r
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\r
43 Server: Microsoft-IIS/5.0\r
44 Content-Type: text/html; charset=iso-8859-1\r
45 Content-Length: 34\r
46 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
47 \r
48 HTTP/1.1 302 Thanks for this, but we want to redir you!\r
49 Server: Microsoft-IIS/5.0\r
50 Content-Type: text/html; charset=iso-8859-1\r
51 Location: /1100\r
52 Content-Length: 34\r
53 \r
54 HTTP/1.1 200 Thanks for this! swsclose\r
55 Content-Length: 25\r
56 \r
57 This is the final page !
58 </datacheck>
59
60 </reply>
61
62 # Client-side
63 <client>
64 <features>
65 NTLM
66 !SSPI
67 debug
68 </features>
69 <server>
70 http
71 </server>
72  <name>
73 HTTP POST with NTLM authorization and following a 302 redirect
74  </name>
75  <setenv>
76 # we force our own host name, in order to make the test machine independent
77 CURL_GETHOSTNAME=curlhost
78 # we try to use the LD_PRELOAD hack, if not a debug build
79 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
80  </setenv>
81  <command>
82 http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away" 
83 </command>
84 <precheck>
85 chkhostname curlhost
86 </precheck>
87 </client>
88
89 # Verify data after the test has been "shot"
90 <verify>
91 <strip>
92 ^User-Agent:.*
93 </strip>
94 <protocol>
95 POST /1100 HTTP/1.1\r
96 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
97 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\r
98 Host: %HOSTIP:%HTTPPORT\r
99 Accept: */*\r
100 Content-Length: 0\r
101 Content-Type: application/x-www-form-urlencoded\r
102 \r
103 POST /1100 HTTP/1.1\r
104 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
105 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\r
106 Host: %HOSTIP:%HTTPPORT\r
107 Accept: */*\r
108 Content-Length: 18\r
109 Content-Type: application/x-www-form-urlencoded\r
110 \r
111 stuff to send awayGET /1100 HTTP/1.1\r
112 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\r
113 Host: %HOSTIP:%HTTPPORT\r
114 Accept: */*\r
115 \r
116 </protocol>
117 </verify>
118 </testcase>