[QGIS-Developer] QGIS Server `allowMethod` in Python server plugin not executed

Alessandro Pasotti apasotti at gmail.com
Sat May 2 13:17:32 PDT 2020


On Sat, May 2, 2020 at 3:27 PM Dražen Odobašić
<drazen.odobasic at quaternion.co> wrote:
>
> Hi,
>
> I've been toying around with QGIS Server Python plugins and it seems like `allowMethod` in QgsService does not get executed. A simple `git grep allowMethod` on the master branch shows few definitions but not sure if it's actually called from anywhere (maybe some external lib does actually invoke it, don't know)
>
> Is this method actually used and how does it get called? Maybe it does work in C++, but not in Python?
>

Hi Dražen,

I think that you actually spotted an API leftover. I don't think that
that method is needed, the best place for all checks is probably
executeRequest where  the service/API can decide if a request is valid
according to its internal logic.

But of course if we want to keep it we should at least check for the
HTTP method before we accept the request.

Would you please file a ticket?.


-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   www.itopen.it


More information about the QGIS-Developer mailing list