Author: chabotc
Date: Thu Nov 20 12:35:55 2008
New Revision: 719365
URL: http://svn.apache.org/viewvc?rev=719365&view=rev
Log:
Use the slightly faster explode instead of split
Modified:
incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php
Modified: incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php?rev=719365&r1=719364&r2=719365&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/ProxyHandler.php Thu Nov 20
12:35:55 2008
@@ -339,11 +339,10 @@
{
//TODO get actual character encoding from the request
-
// Check the protocol requested - curl doesn't really support
file://
// requests but the 'error' should be handled properly
- $protocolSplit = split(":\/\/", $url);
- if (! count($protocolSplit)) {
+ $protocolSplit = explode('://', $url, 2);
+ if (count($protocolSplit) < 2) {
throw new Exception("Invalid protocol specified for
url: $url");
} else {
$protocol = strtoupper($protocolSplit[0]);