aboutsummaryrefslogtreecommitdiffstats
path: root/unshorturl
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-07-10 18:50:56 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-07-10 18:50:56 +0200
commit2ee84c1570ed9c92c2badbb03294bda1bf6d1f16 (patch)
treefa35c51b346c15bcaa49173325f161f6873bd57c /unshorturl
parent89d075c749b5b25dbc901c6d1337dcdad2c0670a (diff)
downloadvolse-hz-addons-2ee84c1570ed9c92c2badbb03294bda1bf6d1f16.tar.gz
volse-hz-addons-2ee84c1570ed9c92c2badbb03294bda1bf6d1f16.tar.bz2
volse-hz-addons-2ee84c1570ed9c92c2badbb03294bda1bf6d1f16.zip
unshorturl: Match both capital and small L in Location.
Diffstat (limited to 'unshorturl')
-rw-r--r--unshorturl/unshorturl.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/unshorturl/unshorturl.php b/unshorturl/unshorturl.php
index f172b08..6340e9a 100644
--- a/unshorturl/unshorturl.php
+++ b/unshorturl/unshorturl.php
@@ -33,10 +33,12 @@ function unshorturl_get_long_url($shorturl) {
if ($res !== false) {
$matches = [];
- if (preg_match('/^Location: (.*)$/', $res, $matches)) {
+ if (preg_match('/^(?:L|l)ocation: (.*)$/m', $res, $matches)) {
return $matches[1];
}
}
+
+ return false;
}
function unshorturl_prepare_body(&$body) {