Fixes an issue where http handler callback is called before building the URI #references #118

Thank you ShuminHuang for filing this bug
This commit is contained in:
Peter Thorson
2012-08-04 09:59:41 -05:00
parent 4b3ca1911b
commit 16aaa00a1c

View File

@@ -572,9 +572,6 @@ void server<endpoint>::connection<connection_type>::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<endpoint>::connection<connection_type>::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) {