summaryrefslogtreecommitdiffstats
path: root/server/src/http_server.cppm
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/http_server.cppm')
-rw-r--r--server/src/http_server.cppm18
1 files changed, 10 insertions, 8 deletions
diff --git a/server/src/http_server.cppm b/server/src/http_server.cppm
index e70110e..c111118 100644
--- a/server/src/http_server.cppm
+++ b/server/src/http_server.cppm
@@ -300,6 +300,7 @@ template <class InnerCtx>
300struct routed_ctx : InnerCtx 300struct routed_ctx : InnerCtx
301{ 301{
302 verb_set route_methods; 302 verb_set route_methods;
303 boost::urls::url target;
303}; 304};
304 305
305template <class Ctx> 306template <class Ctx>
@@ -687,12 +688,12 @@ class router
687 co_return problem_rsp(ctx, problem, keep_alive{false}); 688 co_return problem_rsp(ctx, problem, keep_alive{false});
688 } 689 }
689 690
690 l_.with( 691 // l_.with(
691 "trace_id", 692 // "trace_id",
692 static_cast<base_ctx const&>(ctx).trace_id.as_string()) 693 // static_cast<base_ctx const&>(ctx).trace_id.as_string())
693 .debug( 694 // .debug(
694 "Request targets {} {}", req_base.method_string(), 695 // "Request targets {} {}", req_base.method_string(),
695 req_url.path()); 696 // req_url.path());
696 697
697 auto mres = match(req_url.segments()); 698 auto mres = match(req_url.segments());
698 if (!mres) 699 if (!mres)
@@ -720,8 +721,9 @@ class router
720 721
721 if (auto mhdl = mres->route_handlers->lookup(*mverb)) 722 if (auto mhdl = mres->route_handlers->lookup(*mverb))
722 { 723 {
723 auto new_ctx = 724 auto new_ctx = routed_ctx<PreRouteCtx>{
724 routed_ctx<PreRouteCtx>{std::move(ctx), mres->allowed_methods()}; 725 std::move(ctx), mres->allowed_methods(), std::move(req_url)
726 };
725 co_return co_await mhdl( 727 co_return co_await mhdl(
726 std::move(new_ctx), r, mres->wildcard_matches); 728 std::move(new_ctx), r, mres->wildcard_matches);
727 } 729 }