From 3c3d38d09a9b3ae17ef861effe8423b6ea4ec89e Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Fri, 21 Aug 2015 12:26:08 +0800 Subject: [PATCH] MDL-51170 core: Scheme section of URL should be case insensitive --- lib/weblib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index 60b65d3bb49..f6a6a91becf 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2590,7 +2590,7 @@ function redirect($url, $message='', $delay=-1) { // Technically, HTTP/1.1 requires Location: header to contain the absolute path. // (In practice browsers accept relative paths - but still, might as well do it properly.) // This code turns relative into absolute. - if (!preg_match('|^[a-z]+:|', $url)) { + if (!preg_match('|^[a-z]+:|i', $url)) { // Get host name http://www.wherever.com. $hostpart = preg_replace('|^(.*?[^:/])/.*$|', '$1', $CFG->wwwroot); if (preg_match('|^/|', $url)) {