Author: jablko
Date: 2008-09-11 13:03:18 -0700 (Thu, 11 Sep 2008)
New Revision: 1372

Added:
   trunk/patches/sockets-adapter.patch
   trunk/patches/web-browser.patch
Log:
Add patches to fix typo in web browser plugin sockets adapter, to use the 
sockets adapter by default because it is universally supported, and to load 
response DOM documents using loadXML() instead of loadHTML(). This should 
really be based on the response content type: 
http://code.google.com/p/qubit-toolkit/issues/detail?id=435


Added: trunk/patches/sockets-adapter.patch
===================================================================
--- trunk/patches/sockets-adapter.patch                         (rev 0)
+++ trunk/patches/sockets-adapter.patch 2008-09-11 20:03:18 UTC (rev 1372)
@@ -0,0 +1,13 @@
+Index: plugins/sfWebBrowserPlugin/lib/sfSocketsAdapter.class.php
+===================================================================
+--- plugins/sfWebBrowserPlugin/lib/sfSocketsAdapter.class.php  (revision 11451)
++++ plugins/sfWebBrowserPlugin/lib/sfSocketsAdapter.class.php  (working copy)
+@@ -91,7 +91,7 @@
+       fclose($fp);
+     }
+ 
+-    $request = "\r\n";
++    $request .= "\r\n";
+ 
+     fwrite($socket, $request);
+ 

Added: trunk/patches/web-browser.patch
===================================================================
--- trunk/patches/web-browser.patch                             (rev 0)
+++ trunk/patches/web-browser.patch     2008-09-11 20:03:18 UTC (rev 1372)
@@ -0,0 +1,38 @@
+Index: plugins/sfWebBrowserPlugin/lib/sfWebBrowser.class.php
+===================================================================
+--- plugins/sfWebBrowserPlugin/lib/sfWebBrowser.class.php      (revision 11451)
++++ plugins/sfWebBrowserPlugin/lib/sfWebBrowser.class.php      (working copy)
+@@ -33,23 +33,8 @@
+     $fields                  = array(),
+     $urlInfo                 = array();
+ 
+-  public function __construct($defaultHeaders = array(), $adapterClass = 
null, $adapterOptions = array())
++  public function __construct($defaultHeaders = array(), $adapterClass = 
'sfSocketsAdapter', $adapterOptions = array())
+   {
+-    if(!$adapterClass)
+-    {
+-      if (function_exists('curl_init'))
+-      {
+-        $adapterClass = 'sfCurlAdapter';
+-      }
+-      else if(ini_get('allow_url_fopen') == 1)
+-      {
+-        $adapterClass = 'sfFopenAdapter';
+-      }
+-      else
+-      {
+-        $adapterClass = 'sfSocketsAdapter';
+-      }
+-    }
+     $this->defaultHeaders = $this->fixHeaders($defaultHeaders);
+     $this->adapter = new $adapterClass($adapterOptions);
+   }
+@@ -631,7 +616,7 @@
+       {
+         $this->responseDom = new DomDocument('1.0', 'utf8');
+         $this->responseDom->validateOnParse = true;
+-        @$this->responseDom->loadHTML($this->getResponseText());
++        @$this->responseDom->loadXML($this->getResponseText());
+       }
+     }
+ 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to