Webserv
|
The central request dispatcher. More...
#include <Router.hpp>
Public Member Functions | |
Router (config::ServerConfig const &config, MimeTypes const &mime) | |
RouterResult | route (int port, HttpRequest &request) const |
Determines the correct handler and context for a request. |
Private Attributes | |
config::ServerConfig const & | config_ |
NotFoundHandler const | notFound_ |
StaticFileHandler const | staticFile_ |
CGIHandler const | cgi_ |
DefaultErrorHandler const | error_ |
The central request dispatcher.
Matches an incoming HttpRequest to a specific handler based on the server configuration.
|
inline |
|
inline |
Determines the correct handler and context for a request.
port | The port the connection was received on. |
request | The client's HTTP request. |
|
private |
|
private |
|
private |
|
private |
|
private |