2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#include "express/dispatcher/RouterDispatcher.h"
44#include "express/Controller.h"
45#include "express/Request.h"
46#include "express/Route.h"
48#ifndef DOXYGEN_SHOULD_SKIP_THIS
50#include "log/Logger.h"
67 return oldStrictRouting;
76 bool dispatched =
false;
85 const bool requestMatched =
97 requestUrl.starts_with(absoluteMountPath)
105 LOG(TRACE) <<
"Express: R - AbsoluteMountPath: " << absoluteMountPath;
108 if (requestMatched) {
109 LOG(TRACE) <<
" MATCH";
113 dispatched = route
.dispatch(controller
, absoluteMountPath
);
118 LOG(TRACE) <<
"Express: R - Dispatched: " << dispatched;
121 LOG(TRACE) <<
"Express: R - NextRouter called - breaking dispatching";
128 LOG(TRACE) <<
" NO MQTCH";
138 std::list<std::string>
140 std::list<std::string> collectedRoutes;
143 collectedRoutes.splice(
144 collectedRoutes.end(),
148 return collectedRoutes;
const std::shared_ptr< Request > & getRequest()
bool setStrictRouting(bool strictRouting)
bool getStrictRouting() const
bool dispatch(Controller &controller, const std::string &parentMountPath)
std::list< std::string > getRoute(const std::string &parentMountPath, bool strictRouting) const
std::list< std::string > getRoutes(const std::string &parentMountPath, const MountPoint &mountPoint, bool strictRouting) const override
bool dispatch(express::Controller &controller, const std::string &parentMountPath, const express::MountPoint &mountPoint) override
std::list< std::string > getRoutes(const std::string &parentMountPath, const MountPoint &mountPoint) const
bool setStrictRouting(bool strictRouting)
std::list< express::Route > & getRoutes()
std::list< express::Route > routes
bool getStrictRouting() const
std::string relativeMountPath