Skip to content

Commit

Permalink
Server: remove unused allowMethod
Browse files Browse the repository at this point in the history
Fixes #36163
  • Loading branch information
elpaso committed Jun 5, 2020
1 parent 4fe0651 commit 055d7c6
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 47 deletions.
5 changes: 0 additions & 5 deletions python/server/auto_generated/qgsserverapi.sip.in
Expand Up @@ -94,11 +94,6 @@ Returns the version of the service
virtual const QString rootPath() const = 0;
%Docstring
Returns the root path for the API
%End

virtual bool allowMethod( QgsServerRequest::Method ) const;
%Docstring
Returns ``True`` if the given method is supported by the API, default implementation supports all methods.
%End

virtual bool accept( const QUrl &url ) const;
Expand Down
6 changes: 0 additions & 6 deletions python/server/auto_generated/qgsservice.sip.in
Expand Up @@ -47,12 +47,6 @@ Constructor
%Docstring

:return: the version of the service
%End

virtual bool allowMethod( QgsServerRequest::Method ) const = 0;
%Docstring
Returns ``True`` if the given method is supported for that
service.
%End

virtual void executeRequest( const QgsServerRequest &request,
Expand Down
5 changes: 0 additions & 5 deletions src/server/qgsserverapi.h
Expand Up @@ -110,11 +110,6 @@ class SERVER_EXPORT QgsServerApi
*/
virtual const QString rootPath() const = 0;

/**
* Returns TRUE if the given method is supported by the API, default implementation supports all methods.
*/
virtual bool allowMethod( QgsServerRequest::Method ) const { return true; }

/**
* Returns TRUE if the given \a url is handled by the API, default implementation checks for the presence of rootPath inside the \a url path.
*/
Expand Down
6 changes: 0 additions & 6 deletions src/server/qgsservice.h
Expand Up @@ -61,12 +61,6 @@ class SERVER_EXPORT QgsService
*/
virtual QString version() const = 0;

/**
* Returns TRUE if the given method is supported for that
* service.
*/
virtual bool allowMethod( QgsServerRequest::Method ) const = 0;

/**
* Execute the requests and set result in QgsServerRequest
*/
Expand Down
5 changes: 0 additions & 5 deletions src/server/services/DummyService/dummy.cpp
Expand Up @@ -26,11 +26,6 @@ class SampleService: public QgsService
QString name() const override { return "SampleService"; }
QString version() const override { return "1.0"; }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{
Expand Down
5 changes: 0 additions & 5 deletions src/server/services/wcs/qgswcs.cpp
Expand Up @@ -50,11 +50,6 @@ namespace QgsWcs
QString name() const override { return QStringLiteral( "WCS" ); }
QString version() const override { return implementationVersion(); }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod || method == QgsServerRequest::PostMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{
Expand Down
5 changes: 0 additions & 5 deletions src/server/services/wfs/qgswfs.cpp
Expand Up @@ -56,11 +56,6 @@ namespace QgsWfs
QString name() const override { return QStringLiteral( "WFS" ); }
QString version() const override { return implementationVersion(); }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod || method == QgsServerRequest::PostMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{
Expand Down
5 changes: 0 additions & 5 deletions src/server/services/wms/qgswms.cpp
Expand Up @@ -62,11 +62,6 @@ namespace QgsWms
QString name() const override { return QStringLiteral( "WMS" ); }
QString version() const override { return mVersion; }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{
Expand Down
5 changes: 0 additions & 5 deletions src/server/services/wmts/qgswmts.cpp
Expand Up @@ -48,11 +48,6 @@ namespace QgsWmts
QString name() const override { return QStringLiteral( "WMTS" ); }
QString version() const override { return implementationVersion(); }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod || method == QgsServerRequest::PostMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{
Expand Down

0 comments on commit 055d7c6

Please sign in to comment.