cvs: pear /XML_RPC RPC.php
| From: | Daniel Convissor | Date: | Mon, 11 Apr 2005 15:57:43 +0000 |
| Subject: | cvs: pear /XML_RPC RPC.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-31103@lists.php.net to get a copy of this message | ||
danielc Mon Apr 11 11:57:43 2005 EDT
Modified files:
/pear/XML_RPC RPC.php
Log:
* Allow HTTP 100 responses if followed by a 200 response. Bug 4116.
http://cvs.php.net/diff.php/pear/XML_RPC/RPC.php?r1=1.66&r2=1.67&ty=u
Index: pear/XML_RPC/RPC.php
diff -u pear/XML_RPC/RPC.php:1.66 pear/XML_RPC/RPC.php:1.67
--- pear/XML_RPC/RPC.php:1.66 Wed Apr 6 19:49:15 2005
+++ pear/XML_RPC/RPC.php Mon Apr 11 11:57:40 2005
@@ -32,7 +32,7 @@
* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill
- * @version CVS: $Id: RPC.php,v 1.66 2005/04/06 23:49:15 danielc Exp $
+ * @version CVS: $Id: RPC.php,v 1.67 2005/04/11 15:57:40 danielc Exp $
* @link http://pear.php.net/package/XML_RPC
*/
@@ -1227,10 +1227,12 @@
print "\n---END---\n</PRE>";
}
- // see if we got an HTTP 200 OK, else bomb
- // but only do this if we're using the HTTP protocol.
+ // See if response is a 200 or a 100 then a 200, else raise error.
+ // But only do this if we're using the HTTP protocol.
if (ereg('^HTTP', $data) &&
- !ereg('^HTTP/[0-9\.]+ 200 ', $data)) {
+ !ereg('^HTTP/[0-9\.]+ 200 ', $data) &&
+ !preg_match('@^HTTP/[0-9\.]+ 10[0-9]([A-Za-z ]+)?[\r\n]+HTTP/[0-9\.]+ 200@',
$data))
+ {
$errstr = substr($data, 0, strpos($data, "\n") - 1);
error_log('HTTP error, got response: ' . $errstr);
$r = new XML_RPC_Response(0, $XML_RPC_err['http_error'],