61 void ExtractPathAndFile(
const char* uri, std::string& pathname, std::string& filename);
67 bool Process(
const char* uri,
const char* query,
68 std::string& content_type,
69 std::string& content_header,
70 std::string& content_str,
80 const std::string &absprefix,
81 const std::string &nameprefix =
"",
82 const std::string &nameprefixrepl =
"");
84 virtual const char*
ClassName()
const {
return "HttpServer"; }
Reference on memory from memory pool.
Represents command with its arguments.
Active object, which is working inside dabc::Thread.
Server provides http access to DABC
int fMonitoring
_monitoring value in h.json, only for top page
int fDefaultAuth
0 - false, 1 - true, -1 - ignored
bool IsFileRequested(const char *uri, std::string &fname)
Check if file is requested.
static bool VerifyFilePath(const char *fname)
Check if relative path below current dir - prevents file access to top directories via http.
std::string fJsRootSys
location of JSROOT code, need to read special files
Server(const std::string &name, dabc::Command cmd=nullptr)
std::string fHttpSys
location of http plugin, need to read special files
std::string fDrawItem
_drawitem value in h.json, only for top page
virtual const char * ClassName() const
Returns class name of the object instance.
std::vector< Location > fLocations
different locations known to server
std::string fLayout
_layout value in h.json
bool IsAuthRequired(const char *uri)
Returns true if authentication is required.
std::string fTopTitle
_toptitle value in h.json
std::string fBrowser
_browser value in h.json
void ExtractPathAndFile(const char *uri, std::string &pathname, std::string &filename)
std::string fDrawOpt
_drawopt value in h.json, only for top page
bool Process(const char *uri, const char *query, std::string &content_type, std::string &content_header, std::string &content_str, dabc::Buffer &content_bin)
Method process different URL requests, should be called from server thread.
std::string fAutoLoad
_autoload value in h.json
static const char * GetMimeType(const char *fname)
void AddLocation(const std::string &filepath, const std::string &absprefix, const std::string &nameprefix="", const std::string &nameprefixrepl="")
Add files location.
std::string fNamePrefix
prefix in filename like "dabc_"
std::string fFilePath
path on file system /home/user/dabc
std::string fNamePrefixRepl
replacement for name prefix like "/files/"
std::string fAbsPrefix
prefix in http address like "/dabcsys"