bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
|
utility class for the HTTP catalog module More...
Classes | |
class | AccessCredentials |
class | AllowedHosts |
Can a given URL be dereferenced given the BES's configuration? More... | |
class | CredentialsManager |
class | EffectiveUrl |
class | EffectiveUrlCache |
class | HttpError |
class | ProxyConfig |
class | RemoteResource |
class | url |
Parse a URL into the protocol, host, path and query parts. More... | |
Functions | |
bool | file_exists (const string &filename) |
bool | file_is_secured (const string &filename) |
std::string | get_env_value (const string &key) |
void | get_type_from_content_type (const string &ctype, string &type) |
void | get_type_from_disposition (const string &disp, string &type) |
void | get_type_from_url (const string &url, string &type) |
void | hexchar (const unsigned char &c, unsigned char &hex1, unsigned char &hex2) |
size_t | load_max_redirects_from_keys () |
void | load_mime_list_from_keys (map< string, string > &mime_list) |
void | load_proxy_from_keys () |
string | url_encode (const string &s) |
Variables | |
std::once_flag | d_cmac_init_once |
Run once_flag for initializing the singleton instance. | |
utility class for the HTTP catalog module
This class provides utilities that extract information from a URL or the returned headers of an HTTP response. It also provides storage for a number of values read from the httpd_catalog.conf configuration file.
Check for file existence
filename | Name of file to check |
Definition at line 205 of file CredentialsManager.cc.
Uses stat() to check that the passed file has the permissions 600 (rw----—). An exception is thrown if the file does not exist.
modeval[0] = (perm & S_IRUSR) ? 'r' : '-'; modeval[1] = (perm & S_IWUSR) ? 'w' : '-'; modeval[2] = (perm & S_IXUSR) ? 'x' : '-'; modeval[3] = (perm & S_IRGRP) ? 'r' : '-'; modeval[4] = (perm & S_IWGRP) ? 'w' : '-'; modeval[5] = (perm & S_IXGRP) ? 'x' : '-'; modeval[6] = (perm & S_IROTH) ? 'r' : '-'; modeval[7] = (perm & S_IWOTH) ? 'w' : '-'; modeval[8] = (perm & S_IXOTH) ? 'x' : '-'; modeval[9] = '\0';
filename |
Definition at line 230 of file CredentialsManager.cc.
std::string http::get_env_value | ( | const string & | key | ) |
Get get the specified environment value. This function returns an empty string if the environment variable is not found, AND if the environment value is set but empty.
key | The environment value to retrieve |
Definition at line 80 of file CredentialsManager.cc.
Definition at line 148 of file HttpUtils.cc.
Look for the type of handler that can read the filename found in the
disp | The disposition string |
type | The type of the handler that can read this file or the empty string if the BES Catalog Utils cannot find a handler to read it. |
Definition at line 110 of file HttpUtils.cc.
Definition at line 168 of file HttpUtils.cc.
void http::hexchar | ( | const unsigned char & | c, |
unsigned char & | hex1, | ||
unsigned char & | hex2 ) |
Thanks to https://gist.github.com/litefeel for this implementation
c | |
hex1 | |
hex2 |
Definition at line 202 of file HttpUtils.cc.
size_t http::load_max_redirects_from_keys | ( | ) |
Loads the value of Http.MaxRedirects from TheBESKeys. If the value is not found, then it is set to the default, HTTP_MAX_REDIRECTS_DEFAULT
Definition at line 178 of file HttpUtils.cc.
std::string http::url_encode | ( | const string & | s | ) |
Thanks to https://gist.github.com/litefeel for this implementation
s |
Definition at line 215 of file HttpUtils.cc.
std::once_flag http::d_cmac_init_once |
Run once_flag for initializing the singleton instance.
Definition at line 66 of file CredentialsManager.cc.