summaryrefslogtreecommitdiffstats
path: root/src/uscxml/URL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/URL.cpp')
-rw-r--r--src/uscxml/URL.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/uscxml/URL.cpp b/src/uscxml/URL.cpp
index 38cb780..67a6e37 100644
--- a/src/uscxml/URL.cpp
+++ b/src/uscxml/URL.cpp
@@ -66,7 +66,7 @@ void URL::dump() {
}
std::cout << std::endl << std::endl;
}
-
+
std::string URL::tmpDir() {
// try hard to find a temporary directory
const char* tmpDir = NULL;
@@ -564,7 +564,7 @@ URLFetcher::URLFetcher() {
_isStarted = false;
_envProxy = NULL;
_multiHandle = curl_multi_init();
-
+
// read proxy information from environment
// CURLOPT_PROXY;
// CURLOPT_PROXY_TRANSFER_MODE;
@@ -575,13 +575,13 @@ URLFetcher::URLFetcher() {
// CURLOPT_PROXYTYPE;
// CURLOPT_PROXYUSERNAME;
// CURLOPT_PROXYUSERPWD;
-
+
/*
see http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html
e.g. 'socks5://bob:marley@localhost:12345'
*/
_envProxy = getenv("USCXML_PROXY");
-
+
#if 0
bool unsupported = false;
CURLcode curlError;
@@ -600,7 +600,7 @@ URLFetcher::URLFetcher() {
if (envProxy)
(curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXY, envProxy)) == CURLE_OK ||
LOG(ERROR) << "Cannot set curl proxy: " << curl_easy_strerror(curlError);
-
+
/* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
if (envProxyTransferMode)
(curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXY_TRANSFER_MODE, envProxyTransferMode)) == CURLE_OK ||
@@ -612,7 +612,7 @@ URLFetcher::URLFetcher() {
if (envProxyAuth)
(curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYAUTH, envProxyAuth)) == CURLE_OK ||
LOG(ERROR) << "Cannot set curl proxy authentication: " << curl_easy_strerror(curlError);
-
+
#if 0
/* This points to a linked list of headers used for proxy requests only,
struct curl_slist kind */
@@ -620,7 +620,7 @@ URLFetcher::URLFetcher() {
(curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYHEADER, envProxyHeader)) == CURLE_OK ||
LOG(ERROR) << "Cannot set curl proxy header: " << curl_easy_strerror(curlError);
#endif
-
+
/* "name" and "pwd" to use with Proxy when fetching. */
if (envProxyUsername)
(curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYUSERNAME, envProxyUsername)) == CURLE_OK ||
@@ -628,13 +628,13 @@ URLFetcher::URLFetcher() {
if (envProxyPassword)
(curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYPASSWORD, envProxyPassword)) == CURLE_OK ||
LOG(ERROR) << "Cannot set curl proxy password: " << curl_easy_strerror(curlError);
-
+
/* Port of the proxy, can be set in the proxy string as well with:
"[host]:[port]" */
if (envProxyPort)
(curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYPORT, envProxyPort)) == CURLE_OK ||
LOG(ERROR) << "Cannot set curl proxy port: " << curl_easy_strerror(curlError);
-
+
#if 0
/* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */
@@ -642,7 +642,7 @@ URLFetcher::URLFetcher() {
(curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYTYPE, envProxyType)) == CURLE_OK ||
LOG(ERROR) << "Cannot set curl proxy type: " << curl_easy_strerror(curlError);
#endif
-
+
/* "user:password" to use with proxy. */
if (envProxyUserPwd)
(curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYUSERPWD, envProxyUserPwd)) == CURLE_OK ||