aboutsummaryrefslogtreecommitdiffstats
path: root/python/werkzeug/wrappers/request.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-08-09 22:01:04 -0700
committerJames Taylor <user234683@users.noreply.github.com>2019-08-09 22:01:04 -0700
commit2e75c6d9603f8a5edf6495f8d4fb3115a67d823c (patch)
tree8fb2d1bec2cf0e50c5fce6bc718f755485419db0 /python/werkzeug/wrappers/request.py
parentcc9283ad5332f59a69a91d9d0fab299779de513c (diff)
parentadc40bc760345a23678a01f27d7697dfd3811914 (diff)
downloadyt-local-2e75c6d9603f8a5edf6495f8d4fb3115a67d823c.tar.lz
yt-local-2e75c6d9603f8a5edf6495f8d4fb3115a67d823c.tar.xz
yt-local-2e75c6d9603f8a5edf6495f8d4fb3115a67d823c.zip
Merge flask framework and other stuff from master
Diffstat (limited to 'python/werkzeug/wrappers/request.py')
-rw-r--r--python/werkzeug/wrappers/request.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/python/werkzeug/wrappers/request.py b/python/werkzeug/wrappers/request.py
new file mode 100644
index 0000000..d1c71b6
--- /dev/null
+++ b/python/werkzeug/wrappers/request.py
@@ -0,0 +1,44 @@
+from .accept import AcceptMixin
+from .auth import AuthorizationMixin
+from .base_request import BaseRequest
+from .common_descriptors import CommonRequestDescriptorsMixin
+from .etag import ETagRequestMixin
+from .user_agent import UserAgentMixin
+
+
+class Request(
+ BaseRequest,
+ AcceptMixin,
+ ETagRequestMixin,
+ UserAgentMixin,
+ AuthorizationMixin,
+ CommonRequestDescriptorsMixin,
+):
+ """Full featured request object implementing the following mixins:
+
+ - :class:`AcceptMixin` for accept header parsing
+ - :class:`ETagRequestMixin` for etag and cache control handling
+ - :class:`UserAgentMixin` for user agent introspection
+ - :class:`AuthorizationMixin` for http auth handling
+ - :class:`CommonRequestDescriptorsMixin` for common headers
+ """
+
+
+class StreamOnlyMixin(object):
+ """If mixed in before the request object this will change the bahavior
+ of it to disable handling of form parsing. This disables the
+ :attr:`files`, :attr:`form` attributes and will just provide a
+ :attr:`stream` attribute that however is always available.
+
+ .. versionadded:: 0.9
+ """
+
+ disable_data_descriptor = True
+ want_form_data_parsed = False
+
+
+class PlainRequest(StreamOnlyMixin, Request):
+ """A request object without special form parsing capabilities.
+
+ .. versionadded:: 0.9
+ """