|
OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
Functions | |
| bool | configureProxy (CURL *curl, const string &url) |
| Configure the proxy options for the passed curl object. More... | |
| string | http_status_to_string (int status) |
| This function translates an HTTP status code into an error messages. More... | |
| CURL * | init (char *error_buffer) |
| Get's a new instance of CURL* and performs basic configuration of that instance. More... | |
| long | read_url (CURL *curl, const string &url, int fd, vector< string > *resp_hdrs, const vector< string > *request_headers, char error_buffer[]) |
| Use libcurl to dereference a URL. More... | |
Variables | |
| int | curl_trace = 0 |
| const char * | http_client_errors [CLIENT_ERR_MAX-CLIENT_ERR_MIN+1] |
| const char * | http_server_errors [SERVER_ERR_MAX-SERVER_ERR_MIN+1] |
| bool libcurl::configureProxy | ( | CURL * | curl, |
| const string & | url | ||
| ) |
Configure the proxy options for the passed curl object.
The passed URL is the target URL. If the target URL matches the Gateway.NoProxyRegex in the config file, then no proxying is done.
The proxy configuration is stored in the gateway_modules configuration file, gateway.conf. The allowed values are: Gateway.ProxyHost=warsaw.wonderproxy.com Gateway.ProxyPort=8080 Gateway.ProxyUser=username Gateway.ProxyPassword=password Gateway.ProxyUserPW=username:password Gateway.ProxyAuthType=basic | digest | ntlm
Definition at line 304 of file curl_utils.cc.
References BESDEBUG, GatewayUtils::NoProxyRegex, GatewayUtils::ProxyAuthType, GatewayUtils::ProxyHost, GatewayUtils::ProxyPassword, GatewayUtils::ProxyPort, GatewayUtils::ProxyUser, and GatewayUtils::ProxyUserPW.
Referenced by gateway::RemoteHttpResource::RemoteHttpResource().
| string libcurl::http_status_to_string | ( | int | status | ) |
This function translates an HTTP status code into an error messages.
It works for those code greater than or equal to 400.
Definition at line 84 of file curl_utils.cc.
References CLIENT_ERR_MAX, CLIENT_ERR_MIN, SERVER_ERR_MAX, and SERVER_ERR_MIN.
| CURL * libcurl::init | ( | char * | error_buffer | ) |
Get's a new instance of CURL* and performs basic configuration of that instance.
| url | The url used to configure the proy. |
Definition at line 426 of file curl_utils.cc.
References BESDEBUG.
Referenced by BESRegex::BESRegex(), agg_util::RCPtr< ncml_module::AggregationElement >::operator=(), agg_util::RCPtr< ncml_module::AggregationElement >::RCPtr(), and gateway::RemoteHttpResource::RemoteHttpResource().
| long libcurl::read_url | ( | CURL * | curl, |
| const string & | url, | ||
| int | fd, | ||
| vector< string > * | resp_hdrs, | ||
| const vector< string > * | request_headers, | ||
| char | error_buffer[] | ||
| ) |
Use libcurl to dereference a URL.
Read the information referenced by url into the file pointed to by the open file descriptor fd.
| url | The URL to dereference. |
| fd | An open file descriptor (as in 'open' as opposed to 'fopen') which will be the destination for the data; the caller can assume that when this method returns that the body of the response can be retrieved by reading from this file descriptor. |
| resp_hdrs | Value/result parameter for the HTTP Response Headers. |
| request_headers | A pointer to a vector of HTTP request headers. Default is null. These headers will be appended to the list of default headers. |
| Error | Thrown if libcurl encounters a problem; the libcurl error message is stuffed into the Error object. |
Definition at line 527 of file curl_utils.cc.
References BESDEBUG.
| int libcurl::curl_trace = 0 |
Definition at line 39 of file curl_utils.cc.
| const char* libcurl::http_client_errors[CLIENT_ERR_MAX-CLIENT_ERR_MIN+1] |
Definition at line 45 of file curl_utils.cc.
| const char* libcurl::http_server_errors[SERVER_ERR_MAX-SERVER_ERR_MIN+1] |
Definition at line 71 of file curl_utils.cc.