Changes as per review comments

This commit is contained in:
root 2018-07-05 05:02:04 -04:00
parent 92a4034c5e
commit ad5349a488

View File

@ -2064,7 +2064,6 @@ int S3fsCurl::RequestPerform(void)
}
if(500 <= LastResponseCode){
S3FS_PRN_ERR("HTTP response code = %ld Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
S3FS_PRN_INFO3("HTTP response code %ld", LastResponseCode);
sleep(4);
break;
}
@ -2073,26 +2072,19 @@ int S3fsCurl::RequestPerform(void)
switch(LastResponseCode){
case 400:
S3FS_PRN_ERR("HTTP response code %ld Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
S3FS_PRN_INFO3("HTTP response code 400 was returned, returning EIO.");
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
return -EIO;
case 403:
S3FS_PRN_ERR("HTTP response code %ld Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
S3FS_PRN_INFO3("HTTP response code 403 was returned, returning EPERM");
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
return -EPERM;
case 404:
S3FS_PRN_ERR("HTTP response code %ld Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
S3FS_PRN_INFO3("HTTP response code 404 was returned, returning ENOENT");
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
return -ENOENT;
default:
S3FS_PRN_ERR("HTTP response code %ld Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
S3FS_PRN_INFO3("HTTP response code = %ld, returning EIO", LastResponseCode);
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
return -EIO;
}
break;