From 16aaa00a1c2aeddf5b37482e0b965e0cc48bf812 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Sat, 4 Aug 2012 09:59:41 -0500 Subject: [PATCH] Fixes an issue where http handler callback is called before building the URI #references #118 Thank you ShuminHuang for filing this bug --- src/roles/server.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) {