diff -r 87e08a6e4fec -r fdaf9070566c includes/http.php --- a/includes/http.php Wed Jan 16 13:55:49 2008 -0500 +++ b/includes/http.php Thu Jan 17 02:03:33 2008 -0500 @@ -324,24 +324,11 @@ function _sock_open(&$connection) { - if ( $this->debug ) - { - echo '
'; - echo '

' . __CLASS__ . ': Sending request

Request parameters:

'; - echo "

Headers:

$headers
"; - echo "

Cookies: $cookies

"; - echo "

GET URI: " . htmlspecialchars($get) . "

"; - echo "

POST DATA: " . htmlspecialchars($post) . "

"; - } - // Open connection $connection = fsockopen($this->host, $this->port); if ( !$connection ) die(__CLASS__ . '::' . __METHOD__ . ': Could not make connection'); - if ( $this->debug ) - echo '

Connection opened. Writing main request to socket. Raw socket data follows.

';
-    
     // 1 = socket open
     $this->state = 1;
   }
@@ -355,6 +342,20 @@
   {
     $newline = "\r\n";
     
+    if ( $this->debug )
+      echo '

Connection opened. Writing main request to socket. Raw socket data follows.

';
+    
+    if ( $this->debug )
+    {
+      echo '
'; + echo '

' . __CLASS__ . ': Sending request

Request parameters:

'; + echo "

Headers:

$headers
"; + echo "

Cookies: $cookies

"; + echo "

GET URI: " . htmlspecialchars($this->uri . $get) . "

"; + echo "

POST DATA: " . htmlspecialchars($post) . "

"; + } + echo "
";
+    
     $this->_fputs($connection, "{$this->method} {$this->uri}{$get} HTTP/1.1{$newline}");
     $this->_fputs($connection, "Host: {$this->host}{$newline}");
     $this->_fputs($connection, $headers);
@@ -393,7 +394,7 @@
     if ( $this->debug )
     {
       echo '

Response fetched. Closing connection. Response text follows.

';
-      echo htmlspecialchars($buffer);
+      echo htmlspecialchars($this->response);
       echo '

'; }