diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-07-10 18:50:56 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-07-10 18:50:56 +0200 |
commit | 2ee84c1570ed9c92c2badbb03294bda1bf6d1f16 (patch) | |
tree | fa35c51b346c15bcaa49173325f161f6873bd57c /unshorturl/unshorturl.php | |
parent | 89d075c749b5b25dbc901c6d1337dcdad2c0670a (diff) | |
download | volse-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/unshorturl.php')
-rw-r--r-- | unshorturl/unshorturl.php | 4 |
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) { |