diff options
author | Mario Vavti <mario@mariovavti.com> | 2022-10-13 16:38:18 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2022-10-13 16:38:18 +0200 |
commit | 71accb6b0a2aa5e3c77f7ef73d685639d0c6526a (patch) | |
tree | f38a48b65f692aab7076bb0ba23818295c2960f1 /Zotlabs/Module/Sslify.php | |
parent | 2a95500b6538f130df9434f1fb253247872679e8 (diff) | |
download | volse-hubzilla-71accb6b0a2aa5e3c77f7ef73d685639d0c6526a.tar.gz volse-hubzilla-71accb6b0a2aa5e3c77f7ef73d685639d0c6526a.tar.bz2 volse-hubzilla-71accb6b0a2aa5e3c77f7ef73d685639d0c6526a.zip |
fix php warnings
Diffstat (limited to 'Zotlabs/Module/Sslify.php')
-rw-r--r-- | Zotlabs/Module/Sslify.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Zotlabs/Module/Sslify.php b/Zotlabs/Module/Sslify.php index 37be4423b..9dd5c4a0b 100644 --- a/Zotlabs/Module/Sslify.php +++ b/Zotlabs/Module/Sslify.php @@ -9,23 +9,27 @@ class Sslify extends \Zotlabs\Web\Controller { if($x['success']) { $h = explode("\n",$x['header']); foreach ($h as $l) { + if (strpos($l, ':') === false) { + continue; + } + list($k,$v) = array_map("trim", explode(":", trim($l), 2)); $hdrs[strtolower($k)] = $v; } - - if (array_key_exists('content-type', $hdrs)) + + if (array_key_exists('content-type', $hdrs)) header('Content-Type: ' . $hdrs['content-type']); - if (array_key_exists('last-modified', $hdrs)) + if (array_key_exists('last-modified', $hdrs)) header('Last-Modified: ' . $hdrs['last-modified']); - if (array_key_exists('cache-control', $hdrs)) + if (array_key_exists('cache-control', $hdrs)) header('Cache-Control: ' . $hdrs['cache-control']); - if (array_key_exists('expires', $hdrs)) + if (array_key_exists('expires', $hdrs)) header('Expires: ' . $hdrs['expires']); - + echo $x['body']; killme(); } killme(); - } + } } |