diff options
Diffstat (limited to 'https.cpp')
-rw-r--r-- | https.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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<session> Server& m_server; std::optional<http::request_parser<http::string_body>> parser_; // need to reset parser every time, no other mechanism currently http::request<http::string_body> req_; - std::shared_ptr<response_type> res_; + std::shared_ptr<response_type> res_; // std::shared_ptr<void> 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(); |