From 490ed8f68933e6852c8d1593b378a7d7b731bb9e Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Sat, 18 Apr 2015 13:32:04 +0000 Subject: [PATCH 1/2] Reviewed and fixed response codes print in curl.cpp - #157 --- src/curl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/curl.cpp b/src/curl.cpp index 2bc370e..7edcaab 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -1629,9 +1629,8 @@ int S3fsCurl::RequestPerform(void) DPRNNN("curl_easy_getinfo failed while trying to retrieve HTTP response code"); return -EIO; } - DPRNNN("HTTP response code %ld", LastResponseCode); - if(400 > LastResponseCode){ + DPRNNN("HTTP response code %ld", LastResponseCode); return 0; } if(500 <= LastResponseCode){ @@ -1716,10 +1715,13 @@ int S3fsCurl::RequestPerform(void) break; case CURLE_SSL_CACERT: + DPRN("### CURLE_SSL_CACERT"); + // try to locate cert, if successful, then set the // option and continue if(0 == S3fsCurl::curl_ca_bundle.size()){ if(!S3fsCurl::LocateBundle()){ + DPRNCRIT("could not get CURL_CA_BUNDLE."); exit(EXIT_FAILURE); } break; // retry with CAINFO @@ -1730,6 +1732,8 @@ int S3fsCurl::RequestPerform(void) #ifdef CURLE_PEER_FAILED_VERIFICATION case CURLE_PEER_FAILED_VERIFICATION: + DPRN("### CURLE_PEER_FAILED_VERIFICATION"); + first_pos = bucket.find_first_of("."); if(first_pos != string::npos){ FPRNNN("curl returned a CURL_PEER_FAILED_VERIFICATION error"); From 43191eea53543d9567e0b5b75aadbe1844d0b4dd Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Sat, 18 Apr 2015 13:45:58 +0000 Subject: [PATCH 2/2] Added cache apt in travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1946d6f..52bd575 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: cpp +cache: apt before_install: - sudo apt-get update -qq - sudo apt-get install -qq libfuse-dev