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 "core/socket/stream/SocketConnection.h"
45#include "express/Controller.h"
46#include "express/Request.h"
47#include "express/Response.h"
48#include "express/Route.h"
49#include "web/http/server/SocketContext.h"
51#ifndef DOXYGEN_SHOULD_SKIP_THIS
53#include "log/Logger.h"
68 return oldStrictRouting;
77 bool dispatched =
false;
86 const bool requestMatched =
98 requestUrl.starts_with(absoluteMountPath)
104 <<
" HTTP Express: router -> " << (requestMatched ?
"MATCH" :
"NO MATCH");
108 LOG(TRACE) <<
" AbsoluteMountPath: " << absoluteMountPath;
112 if (requestMatched) {
116 dispatched = route
.dispatch(controller
, absoluteMountPath
);
121 LOG(TRACE) <<
"Express: R - Dispatched: " << dispatched;
124 LOG(TRACE) <<
"Express: R - NextRouter called - breaking dispatching";
139 std::list<std::string>
141 std::list<std::string> collectedRoutes;
144 collectedRoutes.splice(
145 collectedRoutes.end(),
149 return collectedRoutes;
const std::string & getConnectionName() const
SocketConnection * getSocketConnection() const
const std::shared_ptr< Request > & getRequest()
bool setStrictRouting(bool strictRouting)
bool getStrictRouting() const
const std::shared_ptr< Response > & getResponse()
web::http::server::SocketContext * getSocketContext() 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