Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server: remove unused allowMethod #36997

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions python/server/auto_generated/qgsserverapi.sip.in
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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