mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Changes HTTP response parser behavior to only read response bodies when a content length header is present
This commit is contained in:
@@ -219,8 +219,10 @@ inline void response::process(std::string::iterator begin,
|
||||
inline size_t response::process_body(const char *buf, size_t len) {
|
||||
// If no content length was set then we read forever and never set m_ready
|
||||
if (m_read == 0) {
|
||||
m_body.append(buf,len);
|
||||
return len;
|
||||
//m_body.append(buf,len);
|
||||
//return len;
|
||||
m_state = DONE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Otherwise m_read is the number of bytes left.
|
||||
|
||||
Reference in New Issue
Block a user