[Mapbender-commits] r3862 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Apr 7 14:23:54 EDT 2009
Author: christoph
Date: 2009-04-07 14:23:54 -0400 (Tue, 07 Apr 2009)
New Revision: 3862
Modified:
trunk/mapbender/http/classes/class_connector.php
Log:
http://trac.osgeo.org/mapbender/ticket/432
Modified: trunk/mapbender/http/classes/class_connector.php
===================================================================
--- trunk/mapbender/http/classes/class_connector.php 2009-04-07 15:52:47 UTC (rev 3861)
+++ trunk/mapbender/http/classes/class_connector.php 2009-04-07 18:23:54 UTC (rev 3862)
@@ -174,16 +174,29 @@
return @file_get_contents($url);
}
else {
+ $errno = 0;
+ $errstr = "";
$urlComponentArray = parse_url($url);
+ $scheme = $urlComponentArray["scheme"];
$host = $urlComponentArray["host"];
$port = $urlComponentArray["port"];
if ($port == "") {
- $port = 80;
+ if ($scheme == "https") {
+ $port = 443;
+ }
+ else {
+ $port = 80;
+ }
}
$path = $urlComponentArray["path"];
$query = $urlComponentArray["query"];
$buf = '';
- $fp = fsockopen($host, $port);
+ if ($scheme == "https") {
+ $fp = fsockopen("ssl://". $host, $port, $errno, $errstr);
+ }
+ else {
+ $fp = fsockopen($host, $port);
+ }
$postStr = "";
$postPath = "POST " . $path . "?" . $query . " HTTP/".$this->httpVersion . "\r\n";
$postStr .= $postPath;
More information about the Mapbender_commits
mailing list