mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-06-07 11:30:49 +00:00
remove Expect: 100-continue header when requesting an IMDSv2 access token
This commit is contained in:
parent
9d1552a54e
commit
b4edad86d6
|
@ -3028,6 +3028,12 @@ int S3fsCurl::GetIAMv2ApiToken()
|
|||
std::string ttlstr = str(S3fsCurl::IAMv2_token_ttl);
|
||||
requestHeaders = curl_slist_sort_insert(requestHeaders, S3fsCurl::IAMv2_token_ttl_hdr.c_str(),
|
||||
ttlstr.c_str());
|
||||
|
||||
// Curl appends an "Expect: 100-continue" header to the token request,
|
||||
// and aws responds with a 417 Expectation Failed. This ensures the
|
||||
// Expect header is empty before the request is sent.
|
||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "Expect", "");
|
||||
|
||||
if(CURLE_OK != curl_easy_setopt(hCurl, CURLOPT_PUT, true)){
|
||||
return -EIO;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user