diff options
author | Andreas Gohr <andi@splitbrain.org> | 2009-03-03 20:35:27 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2009-03-03 20:35:27 +0100 |
commit | 926d4c4ee81addd5526208e038d4b78dbad4bece (patch) | |
tree | 01c3e22e6b54d386819d670ddd6a703ef5b33242 | |
parent | 5dc1766c6bc9475b12f78fbead9524b0da31905d (diff) | |
download | rpg-926d4c4ee81addd5526208e038d4b78dbad4bece.tar.gz rpg-926d4c4ee81addd5526208e038d4b78dbad4bece.tar.bz2 |
Check HTTP response code in XMLRPC client
darcs-hash:20090303193527-7ad00-82bb49362732ec221c7cdab41050d402ea125938.gz
-rw-r--r-- | inc/IXR_Library.php | 6 |
1 files changed, 6 insertions, 0 deletions
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()) { |