Skip to content

Commit

Permalink
HTTP Body read should able to accept long iovecs
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Jan 23, 2025
1 parent 1ed0b2e commit 45fbbb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/http/body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class BodyReadStream : public ROStream {

virtual ssize_t readv(const struct iovec *iov, int iovcnt) override {
ssize_t ret = 0;
auto iovec = IOVector(iov, iovcnt);
SmartCloneIOV<32> ciovec(iov, iovcnt);
iovector_view iovec(ciovec.ptr, iovcnt);
while (!iovec.empty()) {
auto tmp = read(iovec.front().iov_base, iovec.front().iov_len);
if (tmp < 0) return tmp;
Expand Down

0 comments on commit 45fbbb7

Please sign in to comment.