Skip to content

Commit

Permalink
aws-sigv4: use exam.ple.com instead of 127.0.0.1 in test
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
  • Loading branch information
outscale-mgo committed Oct 10, 2022
1 parent ec59e25 commit d513f31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/http_aws_sigv4.c
Expand Up @@ -171,7 +171,7 @@ static CURLcode make_headers(struct Curl_easy *data,
if(data->state.aptr.host) {
size_t pos;

if (strlen(data->state.aptr.host) > FULL_HOST_LEN) {
if(strlen(data->state.aptr.host) > FULL_HOST_LEN) {
ret = CURLE_URL_MALFORMAT;
goto fail;
}
Expand All @@ -181,7 +181,7 @@ static CURLcode make_headers(struct Curl_easy *data,
full_host[pos] = 0;
}
else {
if (strlen(hostname) > FULL_HOST_LEN) {
if(strlen(hostname) > FULL_HOST_LEN) {
ret = CURLE_URL_MALFORMAT;
goto fail;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/data/test1955
Expand Up @@ -50,7 +50,7 @@ lib%TESTNUMBER
</tool>

<command>
http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT
http://exam.ple.com:9000/%TESTNUMBER/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPPORT
</command>
</client>

Expand All @@ -63,8 +63,8 @@ http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT
</strip>
<protocol>
GET /%TESTNUMBER/testapi/test HTTP/1.1
Host: 127.0.0.1:9000
Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/0/127/xxx4_request, SignedHeaders=content-type;host;tesmixcase;test0;test1;test2;test_space;x-xxx-date, Signature=4bde3a4b84dcf26b643b60cdde5dea5a265b0a466d3cdb5e4c4cae96cf10b89f
Host: exam.ple.com:9000
Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/ple/exam/xxx4_request, SignedHeaders=content-type;host;tesmixcase;test0;test1;test2;test_space;x-xxx-date, Signature=819251feec8de52dfaa992320241f23d27cefa979c93e039ae7df03ac486ed16
X-Xxx-Date: 19700101T000000Z
test2: 1234
test_space: t s m end
Expand Down

0 comments on commit d513f31

Please sign in to comment.