mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-06-13 14:22:23 +00:00
Handle a couple of more specific curl errors.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@278 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
parent
7358b3512e
commit
d3c42255b9
|
@ -1,7 +1,7 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(s3fs, 1.21)
|
||||
AC_INIT(s3fs, 1.22)
|
||||
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
|
17
src/s3fs.cpp
17
src/s3fs.cpp
|
@ -342,15 +342,30 @@ static int my_curl_easy_perform(CURL* curl, FILE* f = 0) {
|
|||
sleep(10);
|
||||
break;
|
||||
|
||||
case CURLE_GOT_NOTHING:
|
||||
syslog(LOG_ERR, "### CURLE_GOT_NOTHING");
|
||||
sleep(10);
|
||||
break;
|
||||
|
||||
case CURLE_ABORTED_BY_CALLBACK:
|
||||
syslog(LOG_ERR, "### CURLE_ABORTED_BY_CALLBACK");
|
||||
sleep(10);
|
||||
break;
|
||||
|
||||
case CURLE_HTTP_RETURNED_ERROR:
|
||||
syslog(LOG_ERR, "### CURLE_HTTP_RETURNED_ERROR");
|
||||
|
||||
long responseCode;
|
||||
|
||||
if (curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode) != 0) {
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
syslog(LOG_ERR, "###response=%ld", responseCode);
|
||||
|
||||
if (responseCode == 404) {
|
||||
return -ENOENT;
|
||||
}
|
||||
syslog(LOG_ERR, "###response=%ld", responseCode);
|
||||
if (responseCode < 500) {
|
||||
return -EIO;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user