there are occasional sites which use different capitalisation of Content-Type; which is rare, but completely legal.
This commit is contained in:
parent
19d7cfd66b
commit
f83fc2e35c
@ -10,21 +10,16 @@ class Sslify extends \Zotlabs\Web\Controller {
|
|||||||
$h = explode("\n",$x['header']);
|
$h = explode("\n",$x['header']);
|
||||||
foreach ($h as $l) {
|
foreach ($h as $l) {
|
||||||
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
|
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
|
||||||
$hdrs[$k] = $v;
|
$hdrs[strtolower($k)] = $v;
|
||||||
}
|
}
|
||||||
if (array_key_exists('Content-Type', $hdrs))
|
if (array_key_exists('content-type', $hdrs)) {
|
||||||
$type = $hdrs['Content-Type'];
|
$type = $hdrs['content-type'];
|
||||||
|
header('Content-Type: ' . $type);
|
||||||
header('Content-Type: ' . $type);
|
}
|
||||||
|
|
||||||
echo $x['body'];
|
echo $x['body'];
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
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']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user