forked from orbit-oss/flask
Fixed #1288: app.add_url_rule() should look for OPTIONS methods in a case-insensitive manner
This commit is contained in:
parent
413ae6137e
commit
98b155c65d
2 changed files with 13 additions and 1 deletions
|
|
@ -998,7 +998,7 @@ class Flask(_PackageBoundObject):
|
|||
if isinstance(methods, string_types):
|
||||
raise TypeError('Allowed methods have to be iterables of strings, '
|
||||
'for example: @app.route(..., methods=["POST"])')
|
||||
methods = set(methods)
|
||||
methods = set(item.upper() for item in methods)
|
||||
|
||||
# Methods that should always be added
|
||||
required_methods = set(getattr(view_func, 'required_methods', ()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue