14 HTTP/1.1 401 authentication please swsbounce
\r
15 Server: Microsoft-IIS/6.0
\r
16 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144", qop="auth"
\r
17 Content-Type: text/html; charset=iso-8859-1
\r
22 HTTP/1.1 302 Thanks for this, but we want to redir you!
\r
23 Server: Microsoft-IIS/5.0
\r
24 Content-Type: text/html; charset=iso-8859-1
\r
30 HTTP/1.1 404 Not Found
\r
31 Server: Microsoft-IIS/5.0
\r
32 Content-Type: text/html; charset=iso-8859-1
\r
38 HTTP/1.1 401 authentication please swsbounce
\r
39 Server: Microsoft-IIS/6.0
\r
40 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144", qop="auth"
\r
41 Content-Type: text/html; charset=iso-8859-1
\r
44 HTTP/1.1 302 Thanks for this, but we want to redir you!
\r
45 Server: Microsoft-IIS/5.0
\r
46 Content-Type: text/html; charset=iso-8859-1
\r
50 HTTP/1.1 404 Not Found
\r
51 Server: Microsoft-IIS/5.0
\r
52 Content-Type: text/html; charset=iso-8859-1
\r
69 HTTP GET --digest increasing nonce-count
71 # This test is to ensure the nonce-count (nc) increases
72 # https://github.com/curl/curl/pull/1251
74 -u auser:apasswd --location --digest http://%HOSTIP:%HTTPPORT/1286
78 # Verify data after the test has been "shot"
83 # Reorder the fields in 'Authorization: Digest' header.
84 # Since regular and SSPI digest auth header fields may not have the same order
85 # or whitespace we homogenize so that both may be tested. Also:
86 # - Remove the unique value from cnonce if in RFC format
87 # - Remove the unique value from response if in RFC format
88 # - Remove quotes from qop="auth" used by SSPI
89 # The if statement is one line because runtests evaluates one line at a time.
91 if(s/^(Authorization: Digest )([^\r\n]+)(\r?\n)$//) { $_ = $1 . join(', ', map { s/^(cnonce=)"[a-zA-Z0-9+\/=]+"$/$1REMOVED/; s/^(response=)"[a-f0-9]{32}"$/$1REMOVED/; s/^qop="auth"$/qop=auth/; $_ } sort split(/, */, $2)) . $3; }
95 Host: %HOSTIP:%HTTPPORT
\r
99 Host: %HOSTIP:%HTTPPORT
\r
100 Authorization: Digest cnonce=REMOVED, nc=00000001, nonce="1053604144", qop=auth, realm="testrealm", response=REMOVED, uri="/1286", username="auser"
\r
103 GET /12860001 HTTP/1.1
\r
104 Host: %HOSTIP:%HTTPPORT
\r
105 Authorization: Digest cnonce=REMOVED, nc=00000002, nonce="1053604144", qop=auth, realm="testrealm", response=REMOVED, uri="/12860001", username="auser"
\r