From 926d4c4ee81addd5526208e038d4b78dbad4bece Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Tue, 3 Mar 2009 20:35:27 +0100 Subject: [PATCH] Check HTTP response code in XMLRPC client darcs-hash:20090303193527-7ad00-82bb49362732ec221c7cdab41050d402ea125938.gz --- inc/IXR_Library.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index 2b907519a..3f05eadc9 100644 --- a/inc/IXR_Library.php +++ b/inc/IXR_Library.php @@ -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()) { -- GitLab