[Mapbender-commits] r4645 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Sep 17 10:07:54 EDT 2009


Author: verenadiewald
Date: 2009-09-17 10:07:54 -0400 (Thu, 17 Sep 2009)
New Revision: 4645

Modified:
   trunk/mapbender/http/classes/class_connector.php
Log:
http://trac.osgeo.org/mapbender/ticket/532

Modified: trunk/mapbender/http/classes/class_connector.php
===================================================================
--- trunk/mapbender/http/classes/class_connector.php	2009-09-17 14:06:24 UTC (rev 4644)
+++ trunk/mapbender/http/classes/class_connector.php	2009-09-17 14:07:54 UTC (rev 4645)
@@ -201,6 +201,19 @@
 			}
 		}
 		curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
+		
+		//if httpType is POST, set CURLOPT_POST and CURLOPT_POSTFIELDS  
+		if($this->httpType == 'POST'){
+			curl_setopt ($ch, CURLOPT_POST, 1);
+			curl_setopt ($ch, CURLOPT_POSTFIELDS, $this->httpPostData);
+			$this_header = array(
+   			 		"MIME-Version: 1.0",
+    				"Content-type: text/html; charset=" . CHARSET,
+    				"Content-transfer-encoding: text"
+			); 
+			curl_setopt($ch, CURLOPT_HTTPHEADER, $this_header);
+		}
+		
 		$useragent=CONNECTION_USERAGENT;
 		$e = new mb_exception("connector: CURL connect to: ".$url); 
 		curl_setopt ($ch,CURLOPT_USERAGENT,$useragent);



More information about the Mapbender_commits mailing list