hforge / itools

Python library with tons of features
http://www.hforge.org/itools
GNU General Public License v3.0
22 stars 12 forks source link

Forbiden instead of Method not allowed when i call unimplemented http method on the view #61

Closed poulp closed 7 years ago

poulp commented 7 years ago

I create a view and i don't implement any http method

class TestView(Itools_View):
    pass

If i do a GET on my view i got a 403 Forbidden error. I should revieve a 405 Method not allowed instead.

staverne commented 7 years ago

itools check access before checking that method exist. If you test with this code bellow it works well.

from itools.web.views import ItoolsView

class TestView(ItoolsView):
    access = True

I've changed the control order so we return les 403. I close.