Skip to content

Commit 09581eb

Browse files
authored
Merge pull request #889 from evoskuil/master
Adapt to network change to http request object tags.
2 parents 61f2e6e + 3484655 commit 09581eb

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

include/bitcoin/node/protocols/protocol_html.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class BCN_API protocol_html
4949

5050
/// Message handlers by http method.
5151
void handle_receive_get(const code& ec,
52-
const network::http::method::get& request) NOEXCEPT override;
52+
const network::http::method::get::cptr& get) NOEXCEPT override;
5353

5454
/// Dispatch.
5555
virtual bool try_dispatch_object(

src/protocols/protocol_html.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,54 +34,54 @@ BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
3434
// ----------------------------------------------------------------------------
3535

3636
void protocol_html::handle_receive_get(const code& ec,
37-
const method::get& request) NOEXCEPT
37+
const method::get::cptr& get) NOEXCEPT
3838
{
3939
BC_ASSERT(stranded());
4040

4141
if (stopped(ec))
4242
return;
4343

4444
// Enforce http origin form for get.
45-
if (!is_origin_form(request->target()))
45+
if (!is_origin_form(get->target()))
4646
{
47-
send_bad_target(*request);
47+
send_bad_target(*get);
4848
return;
4949
}
5050

5151
// Enforce http origin policy (if any origins are configured).
52-
if (!is_allowed_origin(*request, request->version()))
52+
if (!is_allowed_origin(*get, get->version()))
5353
{
54-
send_forbidden(*request);
54+
send_forbidden(*get);
5555
return;
5656
}
5757

5858
// Enforce http host header (if any hosts are configured).
59-
if (!is_allowed_host(*request, request->version()))
59+
if (!is_allowed_host(*get, get->version()))
6060
{
61-
send_bad_host(*request);
61+
send_bad_host(*get);
6262
return;
6363
}
6464

6565
// Always try API dispatch, false if unhandled.
66-
if (try_dispatch_object(*request))
66+
if (try_dispatch_object(*get))
6767
return;
6868

6969
// Require file system dispatch if path is configured (always handles).
7070
if (!options_.path.empty())
7171
{
72-
dispatch_file(*request);
72+
dispatch_file(*get);
7373
return;
7474
}
7575

7676
// Require embedded dispatch if site is configured (always handles).
7777
if (options_.pages.enabled())
7878
{
79-
dispatch_embedded(*request);
79+
dispatch_embedded(*get);
8080
return;
8181
}
8282

8383
// Neither site is enabled and object dispatch doesn't support.
84-
send_not_implemented(*request);
84+
send_not_implemented(*get);
8585
}
8686

8787
// Dispatch.

0 commit comments

Comments
 (0)