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

This commit is contained in:
xiongziliang 2023-06-11 09:21:15 +08:00
parent 5f936663b4
commit fe37005526

View File

@ -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;
} }