Skip to content

Commit

Permalink
fix #1453
Browse files Browse the repository at this point in the history
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 ed94806
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/qgshttptransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed94806

Please sign in to comment.