[Mapbender-commits] r4644 - branches/2.6/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Sep 17 10:06:24 EDT 2009


Author: verenadiewald
Date: 2009-09-17 10:06:24 -0400 (Thu, 17 Sep 2009)
New Revision: 4644

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

Modified: branches/2.6/http/classes/class_connector.php
===================================================================
--- branches/2.6/http/classes/class_connector.php	2009-09-16 17:24:03 UTC (rev 4643)
+++ branches/2.6/http/classes/class_connector.php	2009-09-17 14:06:24 UTC (rev 4644)
@@ -165,6 +165,19 @@
 			curl_setopt ($ch, CURLOPT_PROXYUSERPWD, CONNECTION_USER.':'.CONNECTION_PASSWORD);	
 		}
 		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);
+		}
+		
 		$file = curl_exec ($ch);
 		curl_close ($ch);
 



More information about the Mapbender_commits mailing list