xref: /curl/tests/data/test2068 (revision e3461bbd)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP Digest auth
7</keywords>
8</info>
9
10# Server-side
11<reply>
12<data>
13HTTP/1.1 401 authentication please swsbounce
14Server: Microsoft-IIS/6.0
15WWW-Authenticate: Digest realm="testrealm", nonce="1053604144", algorithm="SHA-512-256"
16Content-Type: text/html; charset=iso-8859-1
17Content-Length: 0
18
19</data>
20<data1000>
21HTTP/1.1 200 A OK
22Server: Microsoft-IIS/6.0
23Content-Type: text/html; charset=iso-8859-1
24Content-Length: 3
25
26ok
27</data1000>
28
29<datacheck>
30HTTP/1.1 401 authentication please swsbounce
31Server: Microsoft-IIS/6.0
32WWW-Authenticate: Digest realm="testrealm", nonce="1053604144", algorithm="SHA-512-256"
33Content-Type: text/html; charset=iso-8859-1
34Content-Length: 0
35
36HTTP/1.1 200 A OK
37Server: Microsoft-IIS/6.0
38Content-Type: text/html; charset=iso-8859-1
39Content-Length: 3
40
41ok
42</datacheck>
43
44</reply>
45
46# Client-side
47<client>
48#
49<server>
50http
51</server>
52<features>
53!SSPI
54crypto
55sha512-256
56</features>
57<name>
58HTTP POST --digest with SHA-512-256, userhash=false and user-specified Content-Length header
59</name>
60# This test is to ensure 'Content-Length: 0' is sent while negotiating auth
61# even when there is a user-specified Content-Length header.
62# https://github.com/curl/curl/pull/1242
63<command>
64-H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
65</command>
66</client>
67
68# Verify data after the test has been "shot"
69<verify>
70<protocol nonewline="yes">
71POST /%TESTNUMBER HTTP/1.1
72Host: %HOSTIP:%HTTPPORT
73User-Agent: curl/%VERSION
74Accept: */*
75Content-Length: 0
76Content-Type: application/x-www-form-urlencoded
77
78POST /%TESTNUMBER HTTP/1.1
79Host: %HOSTIP:%HTTPPORT
80Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="0ba2f7ec8045446588eea82bb0c3812aedb05f4eac8883ea65040a52e9c5629e", algorithm=SHA-512-256
81User-Agent: curl/%VERSION
82Accept: */*
83Content-Length: 11
84Content-Type: application/x-www-form-urlencoded
85
86junkelijunk
87</protocol>
88</verify>
89</testcase>
90