Added an error message when HTTP 301 status

This commit is contained in:
Takeshi Nakatani 2019-01-20 07:17:40 +00:00
parent c83a3e67c9
commit 36a4903843

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;