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:
mooredan@suncup.net 2010-12-09 02:59:49 +00:00
parent 7358b3512e
commit d3c42255b9
2 changed files with 17 additions and 2 deletions

View File

@ -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

View File

@ -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;
}