From 9bdd6c00fd40d47477c48affe14249e5bcac0ea6 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Thu, 7 Apr 2016 16:11:49 +0200 Subject: Accept // (schema-less) URLs and use it_url::get_cache() for those in preparation for SSL --- itjs.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'itjs.class') diff --git a/itjs.class b/itjs.class index 3fe6614..7227541 100644 --- a/itjs.class +++ b/itjs.class @@ -211,7 +211,7 @@ static function checksum($fnlist, $p = array()) */ function crcurl($url, $p = array()) { - if (it::match('^http', $url)) # remote url, must fetch to crc + if (it::match('^(http|//)', $url)) # remote url, must fetch to crc list($fn, $short_expire) = array(it_url::get_cache(array('url' => $url, 'maxage' => 3600, 'safety' => 1, 'id' => "itjs_crcurl") + $p), false); else list($fn, $short_expire) = array(($m = it::match("^//(\w+)(/.*)", $url)) ? "/www/$m[0].search.ch" . $m[1] : $GLOBALS['ULTRAHOME'] . $url, true);; -- cgit v1.2.3