From aac5fd96cc9ea03a329234f6b2bd8b12a0f4ae5f Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 15 May 2018 16:51:04 -0700 Subject: provide function to fetch photo contents from url --- Zotlabs/Module/Linkinfo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module/Linkinfo.php') diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php index 3f58f3e01..f0d62b5e0 100644 --- a/Zotlabs/Module/Linkinfo.php +++ b/Zotlabs/Module/Linkinfo.php @@ -55,10 +55,10 @@ class Linkinfo extends \Zotlabs\Web\Controller { $h = explode("\n",$result['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']; + if (array_key_exists('content-type', $hdrs)) + $type = $hdrs['content-type']; if($type) { $zrl = is_matrix_url($url); if(stripos($type,'image/') !== false) { -- cgit v1.2.3