mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-23 13:58:24 +00:00
Set CURLOPT_UNRESTRICTED_AUTH when authenticating (#1681)
This is necessary for authentication to work with AWS when it responds with 307 to the check bucket request when mounting. This happens to newly created buckets according to https://aws.amazon.com/premiumsupport/knowledge-center/s3-http-307-response/. Prior to this, curl would follow the redirect, but would not include the `Authorization` header which would end up with `404`. Co-authored-by: Takeshi Nakatani <ggtakec@gmail.com>
This commit is contained in:
parent
6edf3d6427
commit
a5c1915772
@ -3400,6 +3400,7 @@ int S3fsCurl::CheckBucket()
|
||||
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());
|
||||
curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)&bodydata);
|
||||
curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
||||
curl_easy_setopt(hCurl, CURLOPT_UNRESTRICTED_AUTH, 1L);
|
||||
S3fsCurl::AddUserAgent(hCurl); // put User-Agent
|
||||
|
||||
int result = RequestPerform();
|
||||
|
Loading…
x
Reference in New Issue
Block a user