Skip to content

Commit

Permalink
apply r9841 from trunk
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@9842 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 17, 2008
1 parent 686513a commit 049db4b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/qgshttptransaction.cpp
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 049db4b

Please sign in to comment.