diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-09-02 22:12:30 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-09-02 22:12:30 +0200 |
commit | 94de3b7a8d1b188d29e7d94f9099db64c3d6cfad (patch) | |
tree | 7eb5228077fe2d0235393b9df76d2e73f38e7e6e /inc/HTTPClient.php | |
parent | 00a7b5ad8c432fcfb4f394ab300d802a0fe4c35c (diff) | |
download | rpg-94de3b7a8d1b188d29e7d94f9099db64c3d6cfad.tar.gz rpg-94de3b7a8d1b188d29e7d94f9099db64c3d6cfad.tar.bz2 |
HTTPClient is now used for RSS fetching
darcs-hash:20050902201230-7ad00-3446903b251caa6b0422603fc738b4d4ba872906.gz
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r-- | inc/HTTPClient.php | 6 |
1 files changed, 4 insertions, 2 deletions
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'); } } |