Skip to content

Commit

Permalink
OAPIF source select: fix missing extra query in collections url
Browse files Browse the repository at this point in the history
Fix #46535
  • Loading branch information
elpaso committed Feb 2, 2022
1 parent e608ba2 commit 9e1fbf7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/wfs/qgsoapiflandingpagerequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void QgsOapifLandingPageRequest::processReply()
return;
}

// Strip off suffixex like /collections?f=json
// Strip off suffixes like /collections?f=json
const auto posQuotationMark = mCollectionsUrl.indexOf( '?' );
if ( posQuotationMark > 0 )
{
Expand Down
10 changes: 10 additions & 0 deletions src/providers/wfs/qgswfssourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,16 @@ void QgsWFSSourceSelect::oapifLandingPageReplyFinished()

mAvailableCRS.clear();
QString url( mOAPIFLandingPage->collectionsUrl() );

// Add back any extra query parameters, see issue GH #46535
const QgsWfsConnection connection( cmbConnections->currentText() );
const QUrl connectionUrl( connection.uri().param( QStringLiteral( "url" ) ) );
if ( ! connectionUrl.query().isEmpty() )
{
url.append( '?' );
url.append( connectionUrl.query() );
}

mOAPIFLandingPage.reset();
startOapifCollectionsRequest( url );
}
Expand Down

0 comments on commit 9e1fbf7

Please sign in to comment.