From 94de3b7a8d1b188d29e7d94f9099db64c3d6cfad Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 2 Sep 2005 22:12:30 +0200 Subject: HTTPClient is now used for RSS fetching darcs-hash:20050902201230-7ad00-3446903b251caa6b0422603fc738b4d4ba872906.gz --- inc/HTTPClient.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'inc/HTTPClient.php') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 8167952c6..53bd941cd 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -35,7 +35,7 @@ class DokuHTTPClient extends HTTPClient { $this->proxy_port = $conf['proxy']['port']; $this->proxy_user = $conf['proxy']['user']; $this->proxy_pass = $conf['proxy']['pass']; - $this->proxy_ssl = $conf['proxy']['usessl']; + $this->proxy_ssl = $conf['proxy']['ssl']; } } @@ -140,6 +140,7 @@ class HTTPClient { */ function sendRequest($url,$data=array(),$method='GET'){ $this->error = ''; + $this->status = 0; // parse URL into bits $uri = parse_url($url); @@ -187,6 +188,7 @@ class HTTPClient { // open socket $socket = @fsockopen($server,$port,$errno, $errstr, $this->timeout); if (!$socket){ + $resp->status = '-100'; $this->error = "Could not connect to $server:$port\n$errstr ($errno)"; return $false; } @@ -287,7 +289,7 @@ class HTTPClient { $this->resp_headers['location']; } // perform redirected request, always via GET (required by RFC) - return $this->_sendRequest($this->resp_headers['location'],array(),'GET'); + return $this->sendRequest($this->resp_headers['location'],array(),'GET'); } } -- cgit v1.2.3