digest: handle quotes in the path

The 'uri' component needs to be escaped as well.

Also, use goto as a general error mechanism.

Make test 64 use a double quote in the URL.

Closes #20295
This commit is contained in:
Daniel Stenberg 2026-01-13 15:31:06 +01:00
parent 2949faa93c
commit e130c8ff61
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 145 additions and 147 deletions

View file

@ -61,21 +61,21 @@ digest
HTTP with Digest authorization
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --digest
'http://%HOSTIP:%HTTPPORT/%TESTNUMBER"' -u testuser:testpass --digest
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="headers">
GET /%TESTNUMBER HTTP/1.1
GET /%TESTNUMBER" HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
GET /%TESTNUMBER HTTP/1.1
GET /%TESTNUMBER" HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="c55f7f30d83d774a3d2dcacf725abaca"
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER\"", response="eacb00efdf72fed986b32b8d42e99bb9"
User-Agent: curl/%VERSION
Accept: */*