mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:53:34 +03:00
digest: flush state on origin or credential change
Verified by test 1686 Closes #21944
This commit is contained in:
parent
3f1055303e
commit
5c6b488035
8 changed files with 203 additions and 4 deletions
|
|
@ -221,7 +221,7 @@ test1653 test1654 test1655 test1656 test1657 test1658 test1659 test1660 \
|
|||
test1661 test1662 test1663 test1664 test1665 test1666 test1667 test1668 \
|
||||
test1669 test1670 test1671 test1672 test1673 test1674 test1675 test1676 \
|
||||
test1677 test1680 test1681 test1682 test1683 test1684 \
|
||||
test1685 \
|
||||
test1685 test1686 \
|
||||
\
|
||||
test1700 test1701 test1702 test1703 test1704 test1705 test1706 test1707 \
|
||||
test1708 test1709 test1710 test1711 test1712 test1713 test1714 test1715 \
|
||||
|
|
|
|||
84
tests/data/test1686
Normal file
84
tests/data/test1686
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="US-ASCII"?>
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
Digest
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
<reply>
|
||||
<data crlf="headers" nocheck="yes">
|
||||
HTTP/1.1 401 Authorization Required
|
||||
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
||||
WWW-Authenticate: Digest realm="my-backyard", nonce="314156295"
|
||||
Content-Length: 26
|
||||
|
||||
This is not the real page
|
||||
</data>
|
||||
|
||||
# This is supposed to be returned when the server gets a
|
||||
# Authorization: Digest line passed-in from the client
|
||||
<data1000 crlf="headers">
|
||||
HTTP/1.1 200 OK
|
||||
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
||||
Content-Type: text/html; charset=iso-8859-1
|
||||
Content-Length: 23
|
||||
|
||||
This IS the real page!
|
||||
</data1000>
|
||||
|
||||
</reply>
|
||||
|
||||
<client>
|
||||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP Digest to different origins and switching credentials
|
||||
</name>
|
||||
<tool>
|
||||
lib%TESTNUMBER
|
||||
</tool>
|
||||
<command>
|
||||
%HOSTIP %HTTPPORT
|
||||
</command>
|
||||
</client>
|
||||
|
||||
<verify>
|
||||
<protocol crlf="headers">
|
||||
GET /api HTTP/1.1
|
||||
Host: first.test:%HTTPPORT
|
||||
Accept: */*
|
||||
|
||||
GET /api HTTP/1.1
|
||||
Host: first.test:%HTTPPORT
|
||||
Authorization: Digest username="alice", realm="my-backyard", nonce="314156295", uri="/api", response="4ecc00e567c37a9d537727890c2e5b32"
|
||||
Accept: */*
|
||||
|
||||
GET /hook HTTP/1.1
|
||||
Host: second.test:%HTTPPORT
|
||||
Accept: */*
|
||||
|
||||
GET /hook HTTP/1.1
|
||||
Host: second.test:%HTTPPORT
|
||||
Authorization: Digest username="alice", realm="my-backyard", nonce="314156295", uri="/hook", response="d3a7738fb6a23f5543fb8dacc0f0f253"
|
||||
Accept: */*
|
||||
|
||||
GET /hook HTTP/1.1
|
||||
Host: second.test:%HTTPPORT
|
||||
Accept: */*
|
||||
|
||||
GET /hook HTTP/1.1
|
||||
Host: second.test:%HTTPPORT
|
||||
Authorization: Digest username="bob", realm="my-backyard", nonce="314156295", uri="/hook", response="777e68eddb77294d9cbd6134973cbbab"
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue