[QGIS Commit] r9696 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Nov 24 10:48:13 EST 2008


Author: mhugent
Date: 2008-11-24 10:48:13 -0500 (Mon, 24 Nov 2008)
New Revision: 9696

Modified:
   trunk/qgis/src/core/qgshttptransaction.cpp
Log:
Remove server url from path. Some server reject such requests

Modified: trunk/qgis/src/core/qgshttptransaction.cpp
===================================================================
--- trunk/qgis/src/core/qgshttptransaction.cpp	2008-11-24 13:59:24 UTC (rev 9695)
+++ trunk/qgis/src/core/qgshttptransaction.cpp	2008-11-24 15:48:13 UTC (rev 9696)
@@ -113,22 +113,19 @@
   // includes the scheme, host and port (the
   // http://www.address.bit:80), so remove that from the url before
   // executing an http GET.
-  //
-  // gsherman 2008-10-24 - Not sure if the above still holds true. Commenting
-  // out the removal for testing purposes
-  // QString pathAndQuery = httpurl.remove( 0,
-  //                                       httpurl.indexOf( qurl.path() ) );
 
+  QString pathAndQuery = httpurl.remove( 0, httpurl.indexOf( qurl.path() ) );
 
+
   if ( !postData ) //do request with HTTP GET
   {
-    header.setRequest( "GET", httpurl );
+    header.setRequest( "GET", pathAndQuery );
     // do GET using header containing user-agent
     httpid = http->request( header );
   }
   else //do request with HTTP POST
   {
-    header.setRequest( "POST", httpurl );
+    header.setRequest( "POST", pathAndQuery );
     // do POST using header containing user-agent
     httpid = http->request( header, *postData );
   }



More information about the QGIS-commit mailing list