Skip to content

Commit 45fbbb7

Browse files
committed
HTTP Body read should able to accept long iovecs
1 parent 1ed0b2e commit 45fbbb7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

net/http/body.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ class BodyReadStream : public ROStream {
9292

9393
virtual ssize_t readv(const struct iovec *iov, int iovcnt) override {
9494
ssize_t ret = 0;
95-
auto iovec = IOVector(iov, iovcnt);
95+
SmartCloneIOV<32> ciovec(iov, iovcnt);
96+
iovector_view iovec(ciovec.ptr, iovcnt);
9697
while (!iovec.empty()) {
9798
auto tmp = read(iovec.front().iov_base, iovec.front().iov_len);
9899
if (tmp < 0) return tmp;

0 commit comments

Comments
 (0)