/
githubmirror
/
curl
Обзор
Документация
Войти
/
githubmirror
/
curl
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/data/test1976
63 строки
1 KB
Daniel Stenberg
sigv4: URL encode the user name in the header
09 июн 2026, 14:34
Не верифицирован
09 июн 2026, 14:34
c7cba2f
Код
Авторство
О чём код?
<?xml version="1.0" encoding="US-ASCII"?> <testcase> <info> <keywords> HTTP CURLOPT_AWS_SIGV4 aws-sigv4 </keywords> </info> # Server-side <reply> <data> HTTP/1.1 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake Content-Length: 0 </data> </reply> # Client-side <client> <server> http </server> <features> SSL Debug crypto aws </features> <name> HTTP AWS_SIGV4 canonical request header sorting test </name> <command> -X PUT -H "X-Amz-Meta-Test-Two: test2" -H "x-amz-meta-test: test" --aws-sigv4 "aws:amz:us-east-1:s3" -u "xxx:yyy" http://%HOSTIP:%HTTPPORT/%TESTNUMBER </command> </client> # Verify data after the test has been "shot" <verify> <strip> ^Content-Length:.* ^Accept:.* </strip> <strippart> # Strip the actual signature. We only care about header order in this test s/Signature=[a-f0-9]{64}/Signature=stripped/ </strippart> <protocol crlf="headers"> PUT /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT Authorization: AWS4-HMAC-SHA256 Credential=xxx/19700101/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-meta-test;x-amz-meta-test-two, Signature=stripped X-Amz-Date: 19700101T000000Z x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 User-Agent: curl/%VERSION X-Amz-Meta-Test-Two: test2 x-amz-meta-test: test </protocol> </verify> </testcase>