summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 18f4435bc..69a384487 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -111,10 +111,13 @@ class HTTPClient {
*
* Returns the wanted page or false on an error;
*
+ * @param string $url The URL to fetch
+ * @param bool $sloppy304 Return body on 304 not modified
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function get($url){
+ 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;
return $this->resp_body;
}