diff --git a/src/roles/server.hpp b/src/roles/server.hpp index 701596e9aa..aefb36e75f 100644 --- a/src/roles/server.hpp +++ b/src/roles/server.hpp @@ -572,9 +572,6 @@ void server::connection::handle_read_request( m_response.set_status(http::status_code::SWITCHING_PROTOCOLS); } else { - // continue as HTTP? - m_endpoint.get_handler()->http(m_connection.shared_from_this()); - // should there be a more encapsulated http processor here? m_origin = m_request.header("Origin"); @@ -597,6 +594,9 @@ void server::connection::handle_read_request( m_request.uri())); } + // continue as HTTP? + m_endpoint.get_handler()->http(m_connection.shared_from_this()); + m_response.set_status(http::status_code::OK); } } catch (const http::exception& e) {