cvs: pear /XML_RPC RPC.php
| From: | Alan Knowles | Date: | Thu, 25 Jul 2002 03:48:16 +0000 |
| Subject: | cvs: pear /XML_RPC RPC.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-5324@lists.php.net to get a copy of this message | ||
alan_k Wed Jul 24 23:48:16 2002 EDT
Modified files:
/pear/XML_RPC RPC.php
Log:
regex was broken - this should be more reliable hopefully
Index: pear/XML_RPC/RPC.php
diff -u pear/XML_RPC/RPC.php:1.9 pear/XML_RPC/RPC.php:1.10
--- pear/XML_RPC/RPC.php:1.9 Tue May 21 20:23:53 2002
+++ pear/XML_RPC/RPC.php Wed Jul 24 23:48:16 2002
@@ -1,7 +1,7 @@
<?php
// by Edd Dumbill (C) 1999-2001
// <edd@usefulinc.com>
-// $Id: RPC.php,v 1.9 2002/05/22 00:23:53 cox Exp $
+// $Id: RPC.php,v 1.10 2002/07/25 03:48:16 alan_k Exp $
// License is granted to use or modify this software ("XML-RPC for PHP")
// for commercial or non-commercial use provided the copyright of the author
@@ -642,8 +642,11 @@
return $r;
}
// gotta get rid of headers here
- if ((!$hdrfnd) &&
ereg("^(.*)\r\n\r\n",$data,$XML_RPC_xh[$parser]['ha'])) {
- $data=ereg_replace("^.*\r\n\r\n", "", $data);
+
+
+ if ((!$hdrfnd) && ($brpos = strpos($data,"\r\n\r\n"))) {
+ $XML_RPC_xh[$parser]['ha'] = substr($data,0,$brpos);
+ $data= substr($data,$brpos+4);
$hdrfnd=1;
}