mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-24 23:19:47 +03:00
Lower case comparison for http_method_names
Ref Issue: https://github.com/encode/django-rest-framework/issues/8753 Co-authored-by: Abhishek Rana <arana@thesummitgrp.com>
This commit is contained in:
parent
56946fac8f
commit
33aec44ecc
|
@ -497,7 +497,7 @@ class APIView(View):
|
|||
self.initial(request, *args, **kwargs)
|
||||
|
||||
# Get the appropriate handler method
|
||||
if request.method.lower() in self.http_method_names:
|
||||
if request.method.lower() in list(map(lambda x: x.lower(), self.http_method_names)):
|
||||
handler = getattr(self, request.method.lower(),
|
||||
self.http_method_not_allowed)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user