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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Dec 17 18:45:12 EST 2008


Author: jef
Date: 2008-12-17 18:45:12 -0500 (Wed, 17 Dec 2008)
New Revision: 9841

Modified:
   trunk/qgis/src/core/qgshttptransaction.cpp
Log:
fix #1453

Modified: trunk/qgis/src/core/qgshttptransaction.cpp
===================================================================
--- trunk/qgis/src/core/qgshttptransaction.cpp	2008-12-17 18:55:51 UTC (rev 9840)
+++ trunk/qgis/src/core/qgshttptransaction.cpp	2008-12-17 23:45:12 UTC (rev 9841)
@@ -82,7 +82,14 @@
   // Create a header so we can set the user agent (Per WMS RFC).
   QHttpRequestHeader header( "GET", qurl.host() );
   // Set host in the header
-  header.setValue( "Host", qurl.host() );
+  if( qurl.port( HTTP_PORT_DEFAULT ) == HTTP_PORT_DEFAULT )
+  {
+    header.setValue( "Host", qurl.host() );
+  }
+  else
+  {
+    header.setValue( "Host", QString( "%1:%2" ).arg( qurl.host() ).arg( qurl.port() ) );
+  }
   // Set the user agent to Quantum GIS plus the version name
   header.setValue( "User-agent", QString( "Quantum GIS - " ) + VERSION );
   // Set the host in the QHttp object



More information about the QGIS-commit mailing list