mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-06-15 15:22:23 +00:00
Use XML parsing with PUT HTTP 200 responses (#1858)
This works around the missing strcasestr on win32. References #728.
This commit is contained in:
parent
6300859c80
commit
93d1c30d4d
|
@ -1280,9 +1280,9 @@ int S3fsCurl::MapPutErrorResponse(int result)
|
||||||
// </Error>
|
// </Error>
|
||||||
//
|
//
|
||||||
const char* pstrbody = bodydata.str();
|
const char* pstrbody = bodydata.str();
|
||||||
if(!pstrbody || NULL != strcasestr(pstrbody, "<Error>")){
|
std::string code;
|
||||||
S3FS_PRN_ERR("Put request get 200 status response, but it included error body(or NULL). The request failed during copying the object in S3.");
|
if(!pstrbody || simple_parse_xml(pstrbody, bodydata.size(), "Code", code)){
|
||||||
S3FS_PRN_DBG("Put request Response Body : %s", (pstrbody ? pstrbody : "(null)"));
|
S3FS_PRN_ERR("Put request get 200 status response, but it included error body(or NULL). The request failed during copying the object in S3. Code: %s", code.c_str());
|
||||||
// TODO: parse more specific error from <Code>
|
// TODO: parse more specific error from <Code>
|
||||||
result = -EIO;
|
result = -EIO;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user