aiohttp-cors icon indicating copy to clipboard operation
aiohttp-cors copied to clipboard

Fix 'Method Not Allowed' on class based views

Open levkovskyi opened this issue 7 years ago • 6 comments

Fix for #177

levkovskyi avatar Jun 11 '18 10:06 levkovskyi

Sorry for digging this up, any reason to not merge these changes ? Have been coming across this issue a lot lately !

alexmick avatar Dec 12 '19 09:12 alexmick

Please could we get this merged? I've also run into this issue, and the patch resovles it for me.

This is my use-case:

router = web.RouteTableDef()

@router.view('/my_endpoint')
class MyEndpoint(web.View, CorsViewMixin):

    async def post(self):
        print(self.request)
        raise web.HTTPOk()

When performing a GET against this, the client sees a 500, and the console sees the KeyError.

After applying the patch, the issue is resolved, and the client sees the correct 405.

attie avatar Feb 14 '20 18:02 attie

Is there a plan to merge this?

This is completely breaking using views with the library...

tommmlij avatar Aug 12 '20 23:08 tommmlij

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 16 '20 10:11 CLAassistant

Please, merge this PR. I think that a signing of Contributor License Agreement is not working. изображение

Cykooz avatar Nov 27 '20 21:11 Cykooz

Any chance for merging it?

tzoiker avatar Aug 29 '22 16:08 tzoiker