summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-02-17 23:20:40 +0100
committerAndreas Gohr <andi@splitbrain.org>2006-02-17 23:20:40 +0100
commit98c868589ee0757f176239cf289cbd007bb74852 (patch)
treeeb48a172b0f1a423b93ffff35f8adf8d579383c1 /inc/HTTPClient.php
parent1c73890c5027011d808d38c583561abc309e8086 (diff)
downloadrpg-98c868589ee0757f176239cf289cbd007bb74852.tar.gz
rpg-98c868589ee0757f176239cf289cbd007bb74852.tar.bz2
file cleanups
This patch cleans up the source code to satisfy the coding guidelines (see http://wiki.splitbrain.org/wiki:development#coding_style) It converts files to UNIX lineendings and removes tabs and trailing whitespace. Not all files were cleaned yet. darcs-hash:20060217222040-7ad00-bba3d2bee3b5aa7cbb5184258abd50805cd071bf.gz
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 0ed34de44..1b9e82fe6 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -18,7 +18,7 @@ define('HTTP_NL',"\r\n");
* @author Andreas Goetz <cpuidle@gmx.de>
*/
class DokuHTTPClient extends HTTPClient {
-
+
/**
* Constructor.
*
@@ -187,7 +187,7 @@ class HTTPClient {
// stop time
$start = time();
-
+
// open socket
$socket = @fsockopen($server,$port,$errno, $errstr, $this->timeout);
if (!$socket){
@@ -269,7 +269,7 @@ class HTTPClient {
}
}
}
-
+
// close socket
$status = socket_get_status($socket);
fclose($socket);
@@ -286,7 +286,7 @@ class HTTPClient {
// handle headers and cookies
$this->resp_headers = $this->_parseHeaders($r_headers);
if(isset($this->resp_headers['set-cookie'])){
- foreach ($this->resp_headers['set-cookie'] as $c){
+ foreach ($this->resp_headers['set-cookie'] as $c){
list($key, $value, $foo) = split('=', $cookie);
$this->cookies[$key] = $value;
}
@@ -389,14 +389,14 @@ class HTTPClient {
* @author Andreas Goetz <cpuidle@gmx.de>
*/
function _getCookies(){
- foreach ($this->cookies as $key => $val){
+ foreach ($this->cookies as $key => $val){
if ($headers) $headers .= '; ';
$headers .= $key.'='.$val;
- }
-
+ }
+
if ($headers) $headers = "Cookie: $headers".HTTP_NL;
return $headers;
- }
+ }
/**
* Encode data for posting