From: pk910 Date: Tue, 2 Jul 2013 02:24:56 +0000 (+0200) Subject: fixed small port fail in HTTPConnector.class.php X-Git-Url: http://git.pk910.de/?p=CodeSnippets.git;a=commitdiff_plain;h=HEAD fixed small port fail in HTTPConnector.class.php --- diff --git a/PHP/HTTPConnector.class.php b/PHP/HTTPConnector.class.php index 596da82..fa37ecf 100644 --- a/PHP/HTTPConnector.class.php +++ b/PHP/HTTPConnector.class.php @@ -42,7 +42,7 @@ class HTTPConnector { $request = array(); $request['host'] = $matches[3]; $request['ssl'] = (strtolower($matches[2]) == "https"); - $request['port'] = ($matches[6] ? $matches[6] : 80); + $request['port'] = ($matches[6] ? $matches[6] : ($request['ssl'] ? 443 : 80)); $request['path'] = ($matches[7] ? $matches[7] : "/"); $request['header'] = $this->default_header; $request['header_only'] = false;