Skip to content

Commit 7141779

Browse files
author
g_j_m
committed
Fix for ticket #26
Remove the http://web.address.net bit from the URL before sending the URL off to the server (some servers don't like it). git-svn-id: http://svn.osgeo.org/qgis/trunk@5355 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a8a1c46 commit 7141779

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/providers/wms/qgshttptransaction.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,13 @@ bool QgsHttpTransaction::getSynchronously(QByteArray &respondedContent, int redi
110110
#endif
111111

112112
httpresponse.truncate(0);
113-
httpid = http->get( httpurl );
113+
114+
// Some WMS servers don't like receiving a http request that
115+
// includes the scheme and host (the http://www.address.bit), so
116+
// remove that from the url before executing an http GET.
117+
QString pathAndQuery = httpurl.remove(0,
118+
httpurl.indexOf(qurl.host()) + qurl.host().count());
119+
httpid = http->get( pathAndQuery );
114120

115121
connect(http, SIGNAL( requestStarted ( int ) ),
116122
this, SLOT( dataStarted ( int ) ) );

0 commit comments

Comments
 (0)