-
Notifications
You must be signed in to change notification settings - Fork 425
add client size close for #712 #713
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
add client size close for #712 #713
Conversation
this->part_begin; | ||
typename protocol_base::buffer_type::const_iterator end = begin; | ||
std::advance(end, remainder); | ||
string_type body_string(begin, end); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you even need this copy of the string? Why not use the range instead?
@@ -476,6 +495,50 @@ struct http_async_connection | |||
} | |||
} | |||
|
|||
inline bool check_parse_body_complete(string_type& body_string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you could avoid using strings here, and just deal with ranges of iterators.
4fc7dda
to
b950ea5
Compare
@deanberris , thanks for your comments, I have move body check logic to async_protocol_handler.hpp and no extra body buffer be copied now, please check, thanks~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi, @deanberris , can you merge those commits from master into 0.13-release branch? |
I attempt to fix #712 , if response body is completed, client side will close connection.
Comments are welcome!
regards,
chenzhaoyu