File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
boost/network/protocol/http Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -132,10 +132,8 @@ namespace boost { namespace network { namespace http {
132
132
}
133
133
134
134
if (content_length != 0 ) {
135
- async_read (
136
- socket_,
135
+ socket_.async_read_some (
137
136
boost::asio::buffer (buffer_),
138
- boost::asio::transfer_at_least (content_length),
139
137
wrapper_.wrap (
140
138
bind (
141
139
&connection<Tag,Handler>::handle_read_body_contents,
@@ -210,7 +208,7 @@ namespace boost { namespace network { namespace http {
210
208
size_t difference = bytes_to_read - bytes_transferred;
211
209
array<char ,BOOST_HTTP_SERVER_BUFFER_SIZE>::iterator start = buffer_.begin (),
212
210
past_end = start;
213
- std::advance (past_end, bytes_to_read);
211
+ std::advance (past_end, std::min ( bytes_to_read,bytes_transferred) );
214
212
request_.body .append (buffer_.begin (), past_end);
215
213
if (difference == 0 ) {
216
214
handler_ (request_, response_);
You can’t perform that action at this time.
0 commit comments