Skip to content

Commit 049db4b

Browse files
author
jef
committed
apply r9841 from trunk
git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@9842 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 686513a commit 049db4b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/core/qgshttptransaction.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,14 @@ bool QgsHttpTransaction::getSynchronously( QByteArray &respondedContent, int red
8282
// Create a header so we can set the user agent (Per WMS RFC).
8383
QHttpRequestHeader header( "GET", qurl.host() );
8484
// Set host in the header
85-
header.setValue( "Host", qurl.host() );
85+
if( qurl.port( HTTP_PORT_DEFAULT ) == HTTP_PORT_DEFAULT )
86+
{
87+
header.setValue( "Host", qurl.host() );
88+
}
89+
else
90+
{
91+
header.setValue( "Host", QString( "%1:%2" ).arg( qurl.host() ).arg( qurl.port() ) );
92+
}
8693
// Set the user agent to Quantum GIS plus the version name
8794
header.setValue( "User-agent", QString( "Quantum GIS - " ) + VERSION );
8895
// Set the host in the QHttp object

0 commit comments

Comments
 (0)