diff options
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(); - } + } } |