Fix proxy code and fix comments to be C comments

This commit is contained in:
Bill Hoffman 2003-01-17 12:27:09 -05:00
parent 8142fe343f
commit d9324c178b

View File

@ -46,15 +46,15 @@ int GetWebFile(void)
proxy_type = 1; proxy_type = 1;
if (getenv("HTTP_PROXY_PORT") ) if (getenv("HTTP_PROXY_PORT") )
{ {
sprintf("%s:%s", getenv("HTTP_PROXY"), getenv("HTTP_PROXY_PORT")); sprintf(proxy, "%s:%s", getenv("HTTP_PROXY"), getenv("HTTP_PROXY_PORT"));
} }
else else
{ {
sprintf("%s", getenv("HTTP_PROXY")); sprintf(proxy, "%s", getenv("HTTP_PROXY"));
} }
if ( getenv("HTTP_PROXY_TYPE") ) if ( getenv("HTTP_PROXY_TYPE") )
{ {
// HTTP/SOCKS4/SOCKS5 /* HTTP/SOCKS4/SOCKS5 */
if ( strcmp(getenv("HTTP_PROXY_TYPE"), "HTTP") == 0 ) if ( strcmp(getenv("HTTP_PROXY_TYPE"), "HTTP") == 0 )
{ {
proxy_type = 1; proxy_type = 1;
@ -76,7 +76,7 @@ int GetWebFile(void)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
curl_easy_setopt(curl, CURLOPT_HEADER, 1); curl_easy_setopt(curl, CURLOPT_HEADER, 1);
// Using proxy /* Using proxy */
if ( proxy_type > 0 ) if ( proxy_type > 0 )
{ {
curl_easy_setopt(curl, CURLOPT_PROXY, proxy); curl_easy_setopt(curl, CURLOPT_PROXY, proxy);