Check HTTP response code in XMLRPC client

darcs-hash:20090303193527-7ad00-82bb49362732ec221c7cdab41050d402ea125938.gz
This commit is contained in:
Andreas Gohr 2009-03-03 20:35:27 +01:00
parent 5dc1766c6b
commit 926d4c4ee8

View file

@ -521,6 +521,12 @@ class IXR_Client extends DokuHTTPClient {
return false;
}
// Check HTTP Response code
if($this->status < 200 || $this->status > 206){
$this->xmlerror = new IXR_Error(-32300, 'transport error - HTTP status '.$this->status);
return false;
}
// Now parse what we've got back
$this->message = new IXR_Message($this->resp_body);
if (!$this->message->parse()) {