diff options
| author | Roland Reichwein <mail@reichwein.it> | 2020-06-06 13:58:22 +0200 | 
|---|---|---|
| committer | Roland Reichwein <mail@reichwein.it> | 2020-06-06 13:58:22 +0200 | 
| commit | d0db131a73933d0a6c65bab59d1e0e4f6a185338 (patch) | |
| tree | 06edad4d845c8ba4102843fc3b306d7b5cc485d6 /https.cpp | |
| parent | 343922258d57261021daca42eb488c1205ae491c (diff) | |
Code cleanup, use gcc 8 on debian 10
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();  | 
