Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #6454 from elpaso/wfs-dcp-post-uri
[wfs] Proper handling of DCP POST Uri
  • Loading branch information
elpaso committed Feb 26, 2018
2 parents c13b627 + 9083ec6 commit 835eb15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/providers/wfs/qgswfsdatasourceuri.cpp
Expand Up @@ -182,7 +182,7 @@ QUrl QgsWFSDataSourceURI::requestUrl( const QString &request, const Method &meth
}
QUrl url( endpoint );
url.addQueryItem( QStringLiteral( "SERVICE" ), QStringLiteral( "WFS" ) );
if ( ! request.isEmpty() )
if ( method == Method::Get && ! request.isEmpty() )
url.addQueryItem( QStringLiteral( "REQUEST" ), request );
return url;
}
Expand Down
4 changes: 1 addition & 3 deletions src/providers/wfs/qgswfstransactionrequest.cpp
Expand Up @@ -23,9 +23,7 @@ QgsWFSTransactionRequest::QgsWFSTransactionRequest( const QgsWFSDataSourceURI &u

bool QgsWFSTransactionRequest::send( const QDomDocument &doc, QDomDocument &serverResponse )
{
QUrl url( mUri.requestUrl( QStringLiteral( "Transaction" ) ) );
// We don't want/need REQUEST=Transaction
url.removeQueryItem( QStringLiteral( "REQUEST" ) );
QUrl url( mUri.requestUrl( QStringLiteral( "Transaction" ), QgsWFSDataSourceURI::Method::Post ) );

QgsDebugMsgLevel( doc.toString(), 4 );

Expand Down

0 comments on commit 835eb15

Please sign in to comment.