aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2015-07-29 18:07:10 +0200
committerWojciech Polak <polak@gnu.org>2015-07-29 18:07:10 +0200
commit016cd65ae72870349b2342d0226cac7294771f50 (patch)
tree464da39284a1c6c43409e0d7cc5aff3a2d7c86ae
parentc01f3a965cc116a7a4aad3c06a802bce49ecf6d9 (diff)
downloadcheetah-016cd65ae72870349b2342d0226cac7294771f50.tar.gz
cheetah-016cd65ae72870349b2342d0226cac7294771f50.tar.bz2
Fix HTTPS fetch handling.HEADmaster
-rw-r--r--frontend/lib/http.class.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/frontend/lib/http.class.php b/frontend/lib/http.class.php
index 6fda479..25e74fb 100644
--- a/frontend/lib/http.class.php
+++ b/frontend/lib/http.class.php
@@ -4,3 +4,3 @@
Cheetah News lib/http.class.php
- Copyright (C) 2005, 2006 Wojciech Polak.
+ Copyright (C) 2005, 2006, 2015 Wojciech Polak.
Copyright (C) 2006 The Cheetah News Team.
@@ -71,2 +71,3 @@ class Http
case 'http':
+ case 'https':
$this->host = $url_parts['host'];
@@ -75,2 +76,7 @@ class Http
+ if ($url_parts['scheme'] == 'https') {
+ $this->host = 'ssl://'.$this->host;
+ $this->port = 443;
+ }
+
if ($this->_connect ($fp))
@@ -89,3 +95,3 @@ class Http
// only follow redirect if it's on this site, or offsiteok is true
- if (preg_match ("|^http://".preg_quote ($this->host)."|i",
+ if (preg_match ("|^https?://".preg_quote ($this->host)."|i",
$this->_redirectaddr) || $this->offsiteok)
@@ -116,2 +122,4 @@ class Http
{
+ $this->host = str_replace ('ssl://', '', $this->host);
+
$url_parts = parse_url ($url);

Return to:

Send suggestions and report system problems to the System administrator.