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#ifndef EXPRESS_DISPATCHER_REGEX_UTILS_H
43#define EXPRESS_DISPATCHER_REGEX_UTILS_H
51#ifndef DOXYGEN_SHOULD_SKIP_THIS
59#include <unordered_map>
66 inline bool ieq(
char a,
char b) {
67 return std::tolower(
static_cast<
unsigned char>(a)) == std::tolower(
static_cast<
unsigned char>(b));
75 bool methodMatches(std::string_view requestMethod,
const std::string& mountMethod);
83 std::map<std::string, std::string>
params;
92 std::string
joinMountPath(std::string_view parentMountPath, std::string_view relativeMountPath);
95 const std::string& absoluteMountPath,
97 std::regex& cachedRegex,
98 std::vector<std::string>& cachedNames,
100 bool caseInsensitiveRouting);
123 ScopedParams(express::
Request& req,
const std::map<std::string, std::string>& params,
bool mergeWithParent);
const std::string & getConnectionName() const
SocketConnection * getSocketConnection() const
const std::shared_ptr< Request > & getRequest() const
const std::shared_ptr< Response > & getResponse() const
std::shared_ptr< Route > nextRoute
std::map< std::string, std::string > queries
void sendStatus(int state, const std::string &html={})
web::http::server::SocketContext * getSocketContext() const
std::list< std::string > getRoute(const std::string &parentMountPath, bool strictRouting) const
bool dispatch(express::Controller &controller, const express::MountPoint &mountPoint, bool strictRouting, bool caseInsensitiveRouting, bool mergeParams) override
std::vector< std::string > names
const std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> lambda
std::list< std::string > getRoutes(const std::string &parentMountPath, const MountPoint &mountPoint, bool strictRouting) const override
ApplicationDispatcher(const std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> &lambda)
std::map< std::string, std::string > backup_
ScopedParams & operator=(const ScopedParams &)=delete
ScopedParams(express::Request &req, const std::map< std::string, std::string > ¶ms, bool mergeWithParent)
ScopedParams & operator=(ScopedParams &&)=delete
ScopedParams(const ScopedParams &)=delete
ScopedParams(ScopedParams &&)=delete
ScopedPathStrip(const ScopedPathStrip &)=delete
std::string backupBaseUrl_
ScopedPathStrip(express::Request &req, bool enabled, std::size_t consumedLength)
ScopedPathStrip & operator=(ScopedPathStrip &&)=delete
ScopedPathStrip & operator=(const ScopedPathStrip &)=delete
ScopedPathStrip(ScopedPathStrip &&)=delete
std::string joinMountPath(std::string_view parentMountPath, std::string_view relativeMountPath)
MountMatchResult matchMountPoint(express::Controller &controller, const std::string &absoluteMountPath, const express::MountPoint &mountPoint, std::regex &cachedRegex, std::vector< std::string > &cachedNames, bool strictRouting, bool caseInsensitiveRouting)
bool methodMatches(std::string_view requestMethod, const std::string &mountMethod)
std::string relativeMountPath
std::size_t consumedLength
std::map< std::string, std::string > params
std::unordered_map< std::string, std::string > requestQueryPairs
std::string_view requestPath