Skip to content
Permalink
Browse files
fix #1453
git-svn-id: http://svn.osgeo.org/qgis/trunk@9841 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 17, 2008
1 parent 64928fd commit ed948066c1ff721d1ae437479d5da8a1f7d5024d
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/core/qgshttptransaction.cpp
@@ -82,7 +82,14 @@ bool QgsHttpTransaction::getSynchronously( QByteArray &respondedContent, int red
// 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

0 comments on commit ed94806

Please sign in to comment.