roar
|
Internal helper class to serve directories. More...
#include <directory_server.hpp>
Public Member Functions | |
DirectoryServer (DirectoryServerConstructionArgs< RequestListenerT > &&args) | |
void | operator() (Session &session, EmptyBodyRequest const &req) |
Private Member Functions | |
std::filesystem::path | resolvePath () const |
std::string | listingStyle () const |
FileAndStatus | getFileAndStatus (boost::beast::string_view target) const |
void | handleFileServe (Session &session, EmptyBodyRequest const &req, FileAndStatus const &fileAndStatus) const |
void | sendHeadResponse (Session &session, EmptyBodyRequest const &req, FileAndStatus const &fileAndStatus) const |
void | sendOptionsResponse (Session &session, EmptyBodyRequest const &req, FileAndStatus const &) const |
void | makeListing (Session &session, EmptyBodyRequest const &req, FileAndStatus const &fileAndStatus) const |
void | upload (Session &session, EmptyBodyRequest const &req, FileAndStatus const &fileAndStatus) const |
void | download (Session &session, EmptyBodyRequest const &req, FileAndStatus const &fileAndStatus) const |
Private Attributes | |
Jail | jail_ |
std::string | basePath_ |
std::function< void(std::string const &)> | onError_ |
std::function< void(bool)> | onFileServeComplete_ |
Private Attributes inherited from Roar::Detail::DirectoryServerConstructionArgs< RequestListenerT > | |
bool | serverIsSecure_ |
ServeInfo< RequestListenerT > | serveInfo_ |
std::shared_ptr< RequestListenerT > | listener_ |
Internal helper class to serve directories.
RequestListenerT |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |