mirror of
https://github.com/curl/curl.git
synced 2024-12-27 06:59:43 +08:00
e2b4df7b5e
This makes the tests easier to copy and relocate to other test numbers without having to update content. Closes #6738
123 lines
2.4 KiB
Plaintext
123 lines
2.4 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP GET
|
|
HTTP NTLM auth
|
|
connection re-use
|
|
</keywords>
|
|
</info>
|
|
# Server-side
|
|
<reply>
|
|
<servercmd>
|
|
connection-monitor
|
|
</servercmd>
|
|
|
|
<data>
|
|
HTTP/1.1 401 Authentication please!
|
|
Content-Length: 20
|
|
WWW-Authenticate: Digest realm="loonie", nonce="314156592"
|
|
WWW-Authenticate: Basic
|
|
|
|
Please auth with me
|
|
</data>
|
|
|
|
<data3>
|
|
HTTP/1.1 401 Authentication please!
|
|
Content-Length: 20
|
|
WWW-Authenticate: Digest realm="loonie", nonce="314156592"
|
|
WWW-Authenticate: Basic
|
|
|
|
Please auth with me
|
|
</data3>
|
|
|
|
# This is supposed to be returned when the server gets the second
|
|
# Authorization: NTLM line passed-in from the client
|
|
<data1000>
|
|
HTTP/1.1 200 Things are fine in server land
|
|
Server: Microsoft-IIS/5.0
|
|
Content-Length: 4
|
|
|
|
moo
|
|
</data1000>
|
|
|
|
<data1003>
|
|
HTTP/1.1 200 OK
|
|
Server: Another one/1.0
|
|
Content-Length: 4
|
|
|
|
boo
|
|
</data1003>
|
|
|
|
# This is the first reply after the redirection
|
|
<data1011>
|
|
HTTP/1.1 200 OK
|
|
Server: Microsoft-IIS/5.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
Content-Length: 34
|
|
|
|
This is not the real page either!
|
|
</data1011>
|
|
|
|
<datacheck>
|
|
HTTP/1.1 401 Authentication please!
|
|
Content-Length: 20
|
|
WWW-Authenticate: Digest realm="loonie", nonce="314156592"
|
|
WWW-Authenticate: Basic
|
|
|
|
HTTP/1.1 200 Things are fine in server land
|
|
Server: Microsoft-IIS/5.0
|
|
Content-Length: 4
|
|
|
|
moo
|
|
</datacheck>
|
|
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<features>
|
|
!SSPI
|
|
crypto
|
|
</features>
|
|
<name>
|
|
HTTP with --anyauth and connection re-use
|
|
</name>
|
|
<command>
|
|
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/%TESTNUMBER0003
|
|
</command>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol>
|
|
GET /%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
GET /%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER", response="986238b7e0077754944c966f56d9bc77"
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
GET /%TESTNUMBER0003 HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
GET /%TESTNUMBER0003 HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER0003", response="1c6390a67bac3283a9b023402f3b3540"
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
[DISCONNECT]
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|