Merge pull request #908 from ggtakec/master

Added an error message when HTTP 301 status
This commit is contained in:
Takeshi Nakatani 2019-01-20 16:59:43 +09:00 committed by GitHub
commit 1d4867830b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2082,8 +2082,12 @@ int S3fsCurl::RequestPerform(void)
break;
}
// Service response codes which are >= 400 && < 500
// Service response codes which are >= 300 && < 500
switch(LastResponseCode){
case 301:
S3FS_PRN_ERR("HTTP response code 301(Moved Permanently: also happens when bucket's region is incorrect), returning EIO. Body Text: %s", (bodydata ? bodydata->str() : ""));
return -EIO;
case 400:
S3FS_PRN_ERR("HTTP response code %ld, returning EIO. Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
return -EIO;