mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-06-07 03:20:50 +00:00
Merge pull request #170 from s3fs-fuse/issue/#157
Reviewed and fixed response codes print in curl.cpp - #157
This commit is contained in:
commit
00f8e1d0ba
|
@ -1,4 +1,5 @@
|
||||||
language: cpp
|
language: cpp
|
||||||
|
cache: apt
|
||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
- sudo apt-get install -qq libfuse-dev
|
- sudo apt-get install -qq libfuse-dev
|
||||||
|
|
|
@ -1629,9 +1629,8 @@ int S3fsCurl::RequestPerform(void)
|
||||||
DPRNNN("curl_easy_getinfo failed while trying to retrieve HTTP response code");
|
DPRNNN("curl_easy_getinfo failed while trying to retrieve HTTP response code");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
DPRNNN("HTTP response code %ld", LastResponseCode);
|
|
||||||
|
|
||||||
if(400 > LastResponseCode){
|
if(400 > LastResponseCode){
|
||||||
|
DPRNNN("HTTP response code %ld", LastResponseCode);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(500 <= LastResponseCode){
|
if(500 <= LastResponseCode){
|
||||||
|
@ -1716,10 +1715,13 @@ int S3fsCurl::RequestPerform(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CURLE_SSL_CACERT:
|
case CURLE_SSL_CACERT:
|
||||||
|
DPRN("### CURLE_SSL_CACERT");
|
||||||
|
|
||||||
// try to locate cert, if successful, then set the
|
// try to locate cert, if successful, then set the
|
||||||
// option and continue
|
// option and continue
|
||||||
if(0 == S3fsCurl::curl_ca_bundle.size()){
|
if(0 == S3fsCurl::curl_ca_bundle.size()){
|
||||||
if(!S3fsCurl::LocateBundle()){
|
if(!S3fsCurl::LocateBundle()){
|
||||||
|
DPRNCRIT("could not get CURL_CA_BUNDLE.");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
break; // retry with CAINFO
|
break; // retry with CAINFO
|
||||||
|
@ -1730,6 +1732,8 @@ int S3fsCurl::RequestPerform(void)
|
||||||
|
|
||||||
#ifdef CURLE_PEER_FAILED_VERIFICATION
|
#ifdef CURLE_PEER_FAILED_VERIFICATION
|
||||||
case CURLE_PEER_FAILED_VERIFICATION:
|
case CURLE_PEER_FAILED_VERIFICATION:
|
||||||
|
DPRN("### CURLE_PEER_FAILED_VERIFICATION");
|
||||||
|
|
||||||
first_pos = bucket.find_first_of(".");
|
first_pos = bucket.find_first_of(".");
|
||||||
if(first_pos != string::npos){
|
if(first_pos != string::npos){
|
||||||
FPRNNN("curl returned a CURL_PEER_FAILED_VERIFICATION error");
|
FPRNNN("curl returned a CURL_PEER_FAILED_VERIFICATION error");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user