Skip to content
Permalink
Browse files
Fix for ticket 1165
git-svn-id: http://svn.osgeo.org/qgis/trunk@8992 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 5, 2008
1 parent 892ab89 commit f5227a6a5e23d7c8f38ef03c212e5b083627e99a
Showing with 10 additions and 4 deletions.
  1. +10 −4 src/plugins/wfs/qgswfssourceselect.cpp
@@ -137,10 +137,6 @@ int QgsWFSSourceSelect::getCapabilities(const QString& uri, QgsWFSSourceSelect::

int QgsWFSSourceSelect::getCapabilitiesGET(QString uri, std::list<QString>& typenames, std::list< std::list<QString> >& crs, std::list<QString>& titles, std::list<QString>& abstracts)
{
if(!(uri.contains("?")))
{
uri.append("?");
}
QString request = uri + "SERVICE=WFS&REQUEST=GetCapabilities&VERSION=1.0.0";

QByteArray result;
@@ -280,6 +276,16 @@ void QgsWFSSourceSelect::connectToServer()
std::list<QString> titles;
std::list<QString> abstracts;

//modify mUri to add '?' or '&' at the end if it is not already there
if ( !(mUri.contains("?")) )
{
mUri.append("?");
}
else if ((mUri.right(1) != "?") && (mUri.right(1) != "&"))
{
mUri.append("&");
}

if(getCapabilities(mUri, QgsWFSSourceSelect::GET, typenames, crsList, titles, abstracts) != 0)
{
qWarning("error during GetCapabilities request");

0 comments on commit f5227a6

Please sign in to comment.