aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-08-31 12:27:56 +0200
committerArthurHoaro <arthur@hoa.ro>2015-08-31 12:30:59 +0200
commit26c503460cd2b50c2c122dba73d62e09ee04b9c8 (patch)
tree3a094cebb88ef744120426b06b71bd7585e46359
parent9e1724f1922bf9e38299eecedfce2dcdbd416749 (diff)
downloadShaarli-26c503460cd2b50c2c122dba73d62e09ee04b9c8.tar.gz
Shaarli-26c503460cd2b50c2c122dba73d62e09ee04b9c8.tar.zst
Shaarli-26c503460cd2b50c2c122dba73d62e09ee04b9c8.zip
Add HTTPS support for title extracting feature
-rwxr-xr-xindex.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index ba70b29c..9c3f7c1b 100755
--- a/index.php
+++ b/index.php
@@ -1497,8 +1497,8 @@ function renderPage()
1497 $description = (empty($_GET['description']) ? '' : $_GET['description']); 1497 $description = (empty($_GET['description']) ? '' : $_GET['description']);
1498 $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); 1498 $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] );
1499 $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); 1499 $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0);
1500 // If this is an HTTP link, we try go get the page to extract the title (otherwise we will to straight to the edit form.) 1500 // If this is an HTTP(S) link, we try go get the page to extract the title (otherwise we will to straight to the edit form.)
1501 if (empty($title) && $url->getScheme() == 'http') { 1501 if (empty($title) && strpos($url->getScheme(), 'http') !== false) {
1502 list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive. 1502 list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
1503 // FIXME: Decode charset according to specified in either 1) HTTP response headers or 2) <head> in html 1503 // FIXME: Decode charset according to specified in either 1) HTTP response headers or 2) <head> in html
1504 if (strpos($status,'200 OK')!==false) { 1504 if (strpos($status,'200 OK')!==false) {