diff --git a/include/bitcoin/node/protocols/protocol_html.hpp b/include/bitcoin/node/protocols/protocol_html.hpp index 89912f410..847eedf22 100644 --- a/include/bitcoin/node/protocols/protocol_html.hpp +++ b/include/bitcoin/node/protocols/protocol_html.hpp @@ -49,7 +49,7 @@ class BCN_API protocol_html /// Message handlers by http method. void handle_receive_get(const code& ec, - const network::http::method::get& request) NOEXCEPT override; + const network::http::method::get::cptr& get) NOEXCEPT override; /// Dispatch. virtual bool try_dispatch_object( diff --git a/src/protocols/protocol_html.cpp b/src/protocols/protocol_html.cpp index 4e9ea17df..7e35e0d52 100644 --- a/src/protocols/protocol_html.cpp +++ b/src/protocols/protocol_html.cpp @@ -34,7 +34,7 @@ BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT) // ---------------------------------------------------------------------------- void protocol_html::handle_receive_get(const code& ec, - const method::get& request) NOEXCEPT + const method::get::cptr& get) NOEXCEPT { BC_ASSERT(stranded()); @@ -42,46 +42,46 @@ void protocol_html::handle_receive_get(const code& ec, return; // Enforce http origin form for get. - if (!is_origin_form(request->target())) + if (!is_origin_form(get->target())) { - send_bad_target(*request); + send_bad_target(*get); return; } // Enforce http origin policy (if any origins are configured). - if (!is_allowed_origin(*request, request->version())) + if (!is_allowed_origin(*get, get->version())) { - send_forbidden(*request); + send_forbidden(*get); return; } // Enforce http host header (if any hosts are configured). - if (!is_allowed_host(*request, request->version())) + if (!is_allowed_host(*get, get->version())) { - send_bad_host(*request); + send_bad_host(*get); return; } // Always try API dispatch, false if unhandled. - if (try_dispatch_object(*request)) + if (try_dispatch_object(*get)) return; // Require file system dispatch if path is configured (always handles). if (!options_.path.empty()) { - dispatch_file(*request); + dispatch_file(*get); return; } // Require embedded dispatch if site is configured (always handles). if (options_.pages.enabled()) { - dispatch_embedded(*request); + dispatch_embedded(*get); return; } // Neither site is enabled and object dispatch doesn't support. - send_not_implemented(*request); + send_not_implemented(*get); } // Dispatch.