git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
69540b3
)
- when using curl and keepalive, reset curl handle if we did not get back an http...
author
gggeek
<giunta.gaetano@gmail.com>
Fri, 10 Jan 2014 16:58:07 +0000
(17:58 +0100)
committer
gggeek
<giunta.gaetano@gmail.com>
Fri, 10 Jan 2014 16:58:07 +0000
(17:58 +0100)
ChangeLog
patch
|
blob
|
history
lib/xmlrpc.inc
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index
336265c
..
b0e65e9
100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,3
+1,7
@@
+2014-01-10 - G. Giunta (giunta.gaetano@gmail.com)
\r
+
\r
+ * xmlrpc.inc: when using curl and keepalive, reset curl handle if we did not get back an http 200 response (eg a 302)
\r
+
\r
2010-05-23 - G. Giunta (giunta.gaetano@gmail.com)
\r
\r
* xmlrpc.inc: omit port on http 'Host' header if it is 80;
\r
2010-05-23 - G. Giunta (giunta.gaetano@gmail.com)
\r
\r
* xmlrpc.inc: omit port on http 'Host' header if it is 80;
\r
diff --git
a/lib/xmlrpc.inc
b/lib/xmlrpc.inc
index
5b39a26
..
c3c8995
100644
(file)
--- a/
lib/xmlrpc.inc
+++ b/
lib/xmlrpc.inc
@@
-850,7
+850,7
@@
* http://curl.haxx.se/docs/faq.html#7.3)
\r
*/
\r
var $xmlrpc_curl_handle = null;
\r
* http://curl.haxx.se/docs/faq.html#7.3)
\r
*/
\r
var $xmlrpc_curl_handle = null;
\r
- /// Wheter to use persistent connections for http 1.1 and https
\r
+ /// Whet
h
er to use persistent connections for http 1.1 and https
\r
var $keepalive = false;
\r
/// Charset encodings that can be decoded without problems by the client
\r
var $accepted_charset_encodings = array();
\r
var $keepalive = false;
\r
/// Charset encodings that can be decoded without problems by the client
\r
var $accepted_charset_encodings = array();
\r
@@
-1701,6
+1701,12
@@
curl_close($curl);
\r
}
\r
$resp =& $msg->parseResponse($result, true, $this->return_type);
\r
curl_close($curl);
\r
}
\r
$resp =& $msg->parseResponse($result, true, $this->return_type);
\r
+ // if we got back a 302, we can not reuse the curl handle for later calls
\r
+ if($resp->faultCode() == $GLOBALS['xmlrpcerr']['http_error'] && $keepalive)
\r
+ {
\r
+ curl_close($curl);
\r
+ $this->xmlrpc_curl_handle = null;
\r
+ }
\r
}
\r
return $resp;
\r
}
\r
}
\r
return $resp;
\r
}
\r