Commit fe370055 by xiongziliang

兼容http body超过声明大小的情况

parent 5f936663
...@@ -112,7 +112,7 @@ ssize_t HttpSession::onRecvHeader(const char *header, size_t len) { ...@@ -112,7 +112,7 @@ ssize_t HttpSession::onRecvHeader(const char *header, size_t len) {
_on_recv_body = [this, parser, received, content_len](const char *data, size_t len) mutable { _on_recv_body = [this, parser, received, content_len](const char *data, size_t len) mutable {
received += len; received += len;
onRecvUnlimitedContent(parser, data, len, content_len, received); onRecvUnlimitedContent(parser, data, len, content_len, received);
if (received != content_len) { if (received < content_len) {
// 还没收满 // 还没收满
return true; return true;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论