mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 01:08:54 +00:00
fix: miss header when retry
This commit is contained in:
parent
a16d00d673
commit
51f65d7b14
11
src/curl.cpp
11
src/curl.cpp
@ -2230,17 +2230,18 @@ int S3fsCurl::RequestPerform(bool dontAddAuthHeaders /*=false*/)
|
|||||||
long responseCode;
|
long responseCode;
|
||||||
int result = S3FSCURL_PERFORM_RESULT_NOTSET;
|
int result = S3FSCURL_PERFORM_RESULT_NOTSET;
|
||||||
|
|
||||||
|
// 1 attempt + retries...
|
||||||
|
for(int retrycnt = 0; S3FSCURL_PERFORM_RESULT_NOTSET == result && retrycnt < S3fsCurl::retries; ++retrycnt){
|
||||||
|
// Reset response code
|
||||||
|
responseCode = S3FSCURL_RESPONSECODE_NOTSET;
|
||||||
|
|
||||||
|
// Insert headers
|
||||||
if(!dontAddAuthHeaders) {
|
if(!dontAddAuthHeaders) {
|
||||||
insertAuthHeaders();
|
insertAuthHeaders();
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
|
curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
|
||||||
|
|
||||||
// 1 attempt + retries...
|
|
||||||
for(int retrycnt = 0; S3FSCURL_PERFORM_RESULT_NOTSET == result && retrycnt < S3fsCurl::retries; ++retrycnt){
|
|
||||||
// Reset response code
|
|
||||||
responseCode = S3FSCURL_RESPONSECODE_NOTSET;
|
|
||||||
|
|
||||||
// Requests
|
// Requests
|
||||||
CURLcode curlCode = curl_easy_perform(hCurl);
|
CURLcode curlCode = curl_easy_perform(hCurl);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user