From ab91b35c28866e6a69b28a3a57bfad235e2f79bb Mon Sep 17 00:00:00 2001 From: Gina Haeussge <osd@foosel.net> Date: Sun, 7 Dec 2008 01:19:00 +0100 Subject: [PATCH] HTTP client should accept all HTTP response codes in the 200 range darcs-hash:20081207001900-2b4f5-5d2e6fca1c443884fe7901074be7220c655d0f4a.gz --- inc/HTTPClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 8ff206444..6b3663eaa 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -122,7 +122,7 @@ class HTTPClient { function get($url,$sloppy304=false){ if(!$this->sendRequest($url)) return false; if($this->status == 304 && $sloppy304) return $this->resp_body; - if($this->status != 200) return false; + if($this->status < 200 || $this->status > 206) return false; return $this->resp_body; } @@ -135,7 +135,7 @@ class HTTPClient { */ function post($url,$data){ if(!$this->sendRequest($url,$data,'POST')) return false; - if($this->status != 200) return false; + if($this->status < 200 || $this->status > 206) return false; return $this->resp_body; } -- GitLab