Imported Upstream version 7.59.0
[platform/upstream/curl.git] / tests / data / test2056
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP Negotiate auth (stub krb5)
7 </keywords>
8 </info>
9 # Server-side
10 <reply>
11 <!-- First request, expect 401 Negotiate -->
12 <data>
13 HTTP/1.1 401 Authorization Required
14 Server: Microsoft-IIS/7.0
15 Content-Type: text/html; charset=iso-8859-1
16 WWW-Authenticate: Negotiate
17 Content-Length: 13
18
19 Not yet sir!
20 </data>
21 <!-- Second request, expect success in one shot -->
22 <data1>
23 HTTP/1.1 200 Things are fine in server land
24 Server: Microsoft-IIS/7.0
25 Content-Type: text/html; charset=iso-8859-1
26 WWW-Authenticate: Negotiate RA==
27 Content-Length: 15
28
29 Nice auth sir!
30 </data1>
31 <datacheck>
32 HTTP/1.1 401 Authorization Required
33 Server: Microsoft-IIS/7.0
34 Content-Type: text/html; charset=iso-8859-1
35 WWW-Authenticate: Negotiate
36 Content-Length: 13
37
38 HTTP/1.1 200 Things are fine in server land
39 Server: Microsoft-IIS/7.0
40 Content-Type: text/html; charset=iso-8859-1
41 WWW-Authenticate: Negotiate RA==
42 Content-Length: 15
43
44 Nice auth sir!
45 </datacheck>
46 </reply>
47
48 # Client-side
49 <client>
50 <server>
51 http
52 </server>
53 <name>
54 HTTP Negotiate authentication (stub krb5)
55 </name>
56 <features>
57 GSS-API
58 ld_preload
59 !debug
60 </features>
61 <setenv>
62 LD_PRELOAD=%PWD/libtest/.libs/libstubgss.so
63 CURL_STUB_GSS_CREDS="KRB5_Alice"
64 </setenv>
65 <command>
66 -u: --negotiate http://%HOSTIP:%HTTPPORT/2056
67 </command>
68 </client>
69
70 # Verify data after the test has been "shot"
71 <verify>
72 <strip>
73 ^User-Agent:.*
74 </strip>
75 <protocol>
76 GET /2056 HTTP/1.1
77 Host: %HOSTIP:%HTTPPORT
78 Accept: */*
79
80 GET /2056 HTTP/1.1
81 Host: %HOSTIP:%HTTPPORT
82 Authorization: Negotiate IktSQjVfQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjE6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==
83 Accept: */*
84
85 </protocol>
86 </verify>
87 </testcase>