mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-02-09 05:58:27 +00:00
Log messages for 5xx and 4xx HTTP response code
This commit is contained in:
parent
3e4002df0d
commit
92a4034c5e
@ -2063,6 +2063,7 @@ int S3fsCurl::RequestPerform(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(500 <= LastResponseCode){
|
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);
|
S3FS_PRN_INFO3("HTTP response code %ld", LastResponseCode);
|
||||||
sleep(4);
|
sleep(4);
|
||||||
break;
|
break;
|
||||||
@ -2071,21 +2072,25 @@ int S3fsCurl::RequestPerform(void)
|
|||||||
// Service response codes which are >= 400 && < 500
|
// Service response codes which are >= 400 && < 500
|
||||||
switch(LastResponseCode){
|
switch(LastResponseCode){
|
||||||
case 400:
|
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_INFO3("HTTP response code 400 was returned, returning EIO.");
|
||||||
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
|
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
case 403:
|
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_INFO3("HTTP response code 403 was returned, returning EPERM");
|
||||||
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
|
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
case 404:
|
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_INFO3("HTTP response code 404 was returned, returning ENOENT");
|
||||||
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
|
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
default:
|
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_INFO3("HTTP response code = %ld, returning EIO", LastResponseCode);
|
||||||
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
|
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user