Browse Source

Wrapper: Ensure Request max_content returns None

- Otherwise returns property object for else logic
- Safe handling of key/app existence
pull/2922/head
stephen-st 6 years ago
parent
commit
3263434b66
  1. 3
      flask/wrappers.py

3
flask/wrappers.py

@ -145,8 +145,7 @@ class Request(RequestBase, JSONMixin):
@property
def max_content_length(self):
"""Read-only view of the ``MAX_CONTENT_LENGTH`` config key."""
if current_app:
return current_app.config['MAX_CONTENT_LENGTH']
return current_app.config.get('MAX_CONTENT_LENGTH') if current_app else None:
@property
def endpoint(self):

Loading…
Cancel
Save