aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-15 18:06:49 -0800
committerzotlabs <mike@macgirvin.com>2016-12-15 18:06:49 -0800
commitf83fc2e35cd53538df2b9d0701b38691480f49bb (patch)
treef5a96cea690cb9a50fb78a23f8b7d054dcf317d0 /Zotlabs/Module
parent19d7cfd66b9ebf72a7812934b8fabfce9da1c174 (diff)
downloadvolse-hubzilla-f83fc2e35cd53538df2b9d0701b38691480f49bb.tar.gz
volse-hubzilla-f83fc2e35cd53538df2b9d0701b38691480f49bb.tar.bz2
volse-hubzilla-f83fc2e35cd53538df2b9d0701b38691480f49bb.zip
there are occasional sites which use different capitalisation of Content-Type; which is rare, but completely legal.
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Sslify.php19
1 files changed, 7 insertions, 12 deletions
diff --git a/Zotlabs/Module/Sslify.php b/Zotlabs/Module/Sslify.php
index db73f85e0..2891f3691 100644
--- a/Zotlabs/Module/Sslify.php
+++ b/Zotlabs/Module/Sslify.php
@@ -10,21 +10,16 @@ class Sslify extends \Zotlabs\Web\Controller {
$h = explode("\n",$x['header']);
foreach ($h as $l) {
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
- $hdrs[$k] = $v;
+ $hdrs[strtolower($k)] = $v;
}
- if (array_key_exists('Content-Type', $hdrs))
- $type = $hdrs['Content-Type'];
-
- header('Content-Type: ' . $type);
+ if (array_key_exists('content-type', $hdrs)) {
+ $type = $hdrs['content-type'];
+ header('Content-Type: ' . $type);
+ }
+
echo $x['body'];
killme();
}
killme();
- // for some reason when this fallback is in place - it gets triggered
- // often, (creating mixed content exceptions) even though there is
- // nothing obvious missing on the page when we bypass it.
- goaway($_REQUEST['url']);
- }
-
-
+ }
}