mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-19 10:45:12 +00:00
Merge pull request #60 from andrewgaul/check-bucket-disable-fail-on-error
Emit user-friendly log messages on failed CheckBucket requests
This commit is contained in:
commit
ccaed9a91c
@ -1478,7 +1478,6 @@ bool S3fsCurl::RemakeHandle(void)
|
|||||||
|
|
||||||
case REQTYPE_CHKBUCKET:
|
case REQTYPE_CHKBUCKET:
|
||||||
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());
|
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());
|
||||||
curl_easy_setopt(hCurl, CURLOPT_FAILONERROR, true);
|
|
||||||
curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
|
curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
|
||||||
curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
||||||
curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
|
curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
|
||||||
@ -2390,7 +2389,6 @@ int S3fsCurl::CheckBucket(void)
|
|||||||
}
|
}
|
||||||
// setopt
|
// setopt
|
||||||
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());
|
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());
|
||||||
curl_easy_setopt(hCurl, CURLOPT_FAILONERROR, true);
|
|
||||||
curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
|
curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
|
||||||
curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
||||||
curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
|
curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
|
||||||
@ -2398,6 +2396,9 @@ int S3fsCurl::CheckBucket(void)
|
|||||||
type = REQTYPE_CHKBUCKET;
|
type = REQTYPE_CHKBUCKET;
|
||||||
|
|
||||||
int result = RequestPerform();
|
int result = RequestPerform();
|
||||||
|
if (result != 0) {
|
||||||
|
DPRN("Check bucket failed, S3 response: %s", (bodydata ? bodydata->str() : ""));
|
||||||
|
}
|
||||||
delete bodydata;
|
delete bodydata;
|
||||||
bodydata = NULL;
|
bodydata = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user