Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Body read should able to accept long iovecs #702

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading