mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 08:48:55 +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>
|
||||
//
|
||||
const char* pstrbody = bodydata.str();
|
||||
if(!pstrbody || NULL != strcasestr(pstrbody, "<Error>")){
|
||||
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.");
|
||||
S3FS_PRN_DBG("Put request Response Body : %s", (pstrbody ? pstrbody : "(null)"));
|
||||
std::string code;
|
||||
if(!pstrbody || simple_parse_xml(pstrbody, bodydata.size(), "Code", 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. Code: %s", code.c_str());
|
||||
// TODO: parse more specific error from <Code>
|
||||
result = -EIO;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user