Skip to content

Commit

Permalink
rgw: drop the partial message check while reading messages
Browse files Browse the repository at this point in the history
Avoid leaking connections that had partially-consumed
client data on unexpected disconnect.

Signed-off-by: Or Friedmann <[email protected]>
Signed-off-by: Abhishek Lekshmanan <[email protected]>
  • Loading branch information
theanalyst committed Jan 31, 2020
1 parent 8392c2c commit 20fd89e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/rgw/rgw_asio_frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ class StreamIO : public rgw::asio::ClientIO {
while (body_remaining.size && !parser.is_done()) {
boost::system::error_code ec;
http::read_some(stream, buffer, parser, ec);
if (ec == http::error::partial_message ||
ec == http::error::need_buffer) {
if (ec == http::error::need_buffer) {
break;
}
if (ec) {
Expand Down

0 comments on commit 20fd89e

Please sign in to comment.