Skip to content

Commit ed94806

Browse files
author
jef
committedDec 17, 2008
fix #1453
git-svn-id: http://svn.osgeo.org/qgis/trunk@9841 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 64928fd commit ed94806

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)
Please sign in to comment.