From d0db131a73933d0a6c65bab59d1e0e4f6a185338 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 6 Jun 2020 13:58:22 +0200 Subject: Code cleanup, use gcc 8 on debian 10 --- https.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'https.cpp') diff --git a/https.cpp b/https.cpp index 7ba3b74..bacd7e0 100644 --- a/https.cpp +++ b/https.cpp @@ -46,8 +46,7 @@ namespace { //------------------------------------------------------------------------------ // Report a failure -void -fail( +void fail( #ifdef BOOST_LATEST beast::error_code ec, #else @@ -94,7 +93,7 @@ class session : public std::enable_shared_from_this Server& m_server; std::optional> parser_; // need to reset parser every time, no other mechanism currently http::request req_; - std::shared_ptr res_; + std::shared_ptr res_; // std::shared_ptr void handle_request(::Server& server, request_type&& req) { @@ -253,10 +252,13 @@ public: boost::ignore_unused(bytes_transferred); // This means they closed the connection - if(ec == http::error::end_of_stream) + if (ec == http::error::end_of_stream) return do_close(); - if(ec) + if (ec == http::error::partial_message) + return; // ignore + + if (ec) return fail(ec, "https read"); req_ = parser_->get(); -- cgit v1.2.3