aboutsummaryrefslogtreecommitdiffstats
path: root/mod/sslify.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-25 04:06:26 -0800
committerfriendica <info@friendica.com>2013-12-25 04:06:26 -0800
commit66600ed2f855f11af256abfd624eb771f3352c66 (patch)
tree4616337b28e23e1edffb4232c92f09159c49ceb3 /mod/sslify.php
parent6c0a3f31bb00defeacf9f1534d6e4b6cdc323c0c (diff)
downloadvolse-hubzilla-66600ed2f855f11af256abfd624eb771f3352c66.tar.gz
volse-hubzilla-66600ed2f855f11af256abfd624eb771f3352c66.tar.bz2
volse-hubzilla-66600ed2f855f11af256abfd624eb771f3352c66.zip
try again
Diffstat (limited to 'mod/sslify.php')
-rw-r--r--mod/sslify.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/sslify.php b/mod/sslify.php
index 951a201ea..84afec6dc 100644
--- a/mod/sslify.php
+++ b/mod/sslify.php
@@ -1,6 +1,21 @@
<?php
function sslify_init(&$a) {
+ $x = z_fetch_url($_REQUEST['url']);
+ if($x['success']) {
+ $h = explode("\n",$x['headers']);
+ foreach ($h as $l) {
+ list($k,$v) = array_map("trim", explode(":", trim($l), 2));
+ $hdrs[$k] = $v;
+ }
+ if (array_key_exists('Content-Type', $hdrs))
+ $type = $hdrs['Content-Type'];
+
+ header('Content-Type: ' . $type);
+ echo $x['body'];
+ killme();
+ }
+
goaway($_REQUEST['url']);
}