Skip to content
Permalink
Browse files

Merge pull request #39346 from elpaso/bugfix-server-wfs3-unreported-w…

…rong-extension-handling-in-links

Bugfix server wfs3 unreported wrong extension handling in links
  • Loading branch information
elpaso committed Oct 13, 2020
2 parents ff7641d + 29055f1 commit a3d6965f52cb8fe090bd8afcf5462b70c8ee2c96
Showing with 409 additions and 204 deletions.
  1. +2 −2 src/server/qgsserverogcapihandler.cpp
  2. +407 −202 tests/src/python/test_qgsserver_api.py
@@ -149,7 +149,7 @@ std::string QgsServerOgcApiHandler::href( const QgsServerApiContext &context, co
}

// Remove any existing extension
const auto suffixLength { QFileInfo( url.path() ).completeSuffix().length() };
const auto suffixLength { QFileInfo( url.path() ).suffix().length() };
if ( suffixLength > 0 )
{
auto path {url.path()};
@@ -429,7 +429,7 @@ QgsServerOgcApi::ContentType QgsServerOgcApiHandler::contentTypeFromRequest( con
QgsServerOgcApi::ContentType result { defaultContentType() };
bool found { false };
// First file extension ...
const QString extension { QFileInfo( request->url().path() ).completeSuffix().toUpper() };
const QString extension { QFileInfo( request->url().path() ).suffix().toUpper() };
if ( ! extension.isEmpty() )
{
static QMetaEnum metaEnum { QMetaEnum::fromType<QgsServerOgcApi::ContentType>() };

0 comments on commit a3d6965

Please sign in to comment.
You can’t perform that action at this time.