summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_url.class3
1 files changed, 2 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index fbb4101..6916661 100644
--- a/it_url.class
+++ b/it_url.class
@@ -201,7 +201,7 @@ static function _default_headers($url, $p)
'X-Ultra-Https' => $_SERVER['HTTPS'],
]);
- if (is_int($p['filemtime']))
+ if (!$p['unconditional'] && is_int($p['filemtime']))
$headers['If-Modified-Since'] = gmdate("D, d M Y H:i:s T", $p['filemtime']); # Use GMT as per https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/If-Modified-Since
return $headers;
}
@@ -602,6 +602,7 @@ static function get_cache_filename($p)
* @param $p['safety'] DEPRECATED. see $p['it_error']
* @param $p['it_error'] parameters for it::error(), false means ignore errors, anything else gets passed to it::error() if errors occur
* @param $p['keepfailed'] keep old versions of files if download fails
+ * @param $p['unconditional'] Make request unconditional, i.e. do not send If-Modified-Since header when refetching (Work-around for Windy webcam caching problem)
* @param $p['returnheaders'] Return array($path, $headers) instead of simply $path
* @param $p['postprocess'] UNSUPPORTED, use ::get_cache_contents
* @param $p['lock'] prevent multiple requests to same url from different processes [true]