Index: includes/common.inc =================================================================== RCS file: /home/cvsroot/drupal-4.4.2/includes/common.inc,v retrieving revision 1.1 diff -u -r1.1 common.inc --- includes/common.inc 23 Sep 2004 00:03:27 -0000 1.1 +++ includes/common.inc 4 Feb 2005 04:12:16 -0000 @@ -288,7 +288,12 @@ $uri = parse_url($url); switch ($uri['scheme']) { case 'http': - $fp = @fsockopen($uri['host'], ($uri['port'] ? $uri['port'] : 80), $errno, $errstr, 15); + if (!variable_get('proxy_name', '')) { + //use proxy settings + $fp = @fsockopen('proxy2', '8080'); + } else { + $fp = @fsockopen($uri['host'], ($uri['port'] ? $uri['port'] : 80), $errno, $errstr, 15); + } break; case 'https': // Note: only works for PHP 4.3 compiled with openssl @@ -321,9 +326,16 @@ foreach ($headers as $header => $value) { $defaults[$header] = "$header: $value"; } - - $request = "$method $path HTTP/1.0\r\n"; - $request .= implode("\r\n", $defaults); + + //use proxy settings + if (variable_get('proxy_name', '')) { + $request = "$method ".$uri['scheme']."://".$uri['host'].$path." HTTP/1.1\r\n"; + } + else { + $request = "$method $path HTTP/1.0\r\n"; + $request .= implode("\r\n", $defaults); + } + $request .= "\r\n\r\n"; if ($data) { $request .= "$data\r\n";