Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
MoinMoin.support.werkzeug.wrappers.CommonRequestDescriptorsMixin Class Reference
Inheritance diagram for MoinMoin.support.werkzeug.wrappers.CommonRequestDescriptorsMixin:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def mimetype
def mimetype_params
def pragma

Static Public Attributes

tuple content_type
tuple content_length
tuple referrer
tuple date
tuple max_forwards

Private Member Functions

def _parse_content_type

Private Attributes

 _parsed_content_type

Detailed Description

A mixin for :class:`BaseRequest` subclasses.  Request objects that
mix this class in will automatically get descriptors for a coupl eof
HTTP headers with automatic type conversion.

.. versionadded:: 0.5

Definition at line 955 of file wrappers.py.


Member Function Documentation

Definition at line 987 of file wrappers.py.

00987 
00988     def _parse_content_type(self):
00989         if not hasattr(self, '_parsed_content_type'):
00990             self._parsed_content_type = \
00991                 parse_options_header(self.environ.get('CONTENT_TYPE', ''))

Here is the caller graph for this function:

Like :attr:`content_type` but without parameters (eg, without
charset, type etc.).  For example if the content
type is ``text/html; charset=utf-8`` the mimetype would be
``'text/html'``.

Definition at line 993 of file wrappers.py.

00993 
00994     def mimetype(self):
00995         """Like :attr:`content_type` but without parameters (eg, without
00996         charset, type etc.).  For example if the content
00997         type is ``text/html; charset=utf-8`` the mimetype would be
00998         ``'text/html'``.
00999         """
01000         self._parse_content_type()
01001         return self._parsed_content_type[0]

Here is the call graph for this function:

The mimetype parameters as dict.  For example if the content
type is ``text/html; charset=utf-8`` the params would be
``{'charset': 'utf-8'}``.

Definition at line 1003 of file wrappers.py.

01003 
01004     def mimetype_params(self):
01005         """The mimetype parameters as dict.  For example if the content
01006         type is ``text/html; charset=utf-8`` the params would be
01007         ``{'charset': 'utf-8'}``.
01008         """
01009         self._parse_content_type()
01010         return self._parsed_content_type[1]

Here is the call graph for this function:

The Pragma general-header field is used to include
implementation-specific directives that might apply to any recipient
along the request/response chain.  All pragma directives specify
optional behavior from the viewpoint of the protocol; however, some
systems MAY require that behavior be consistent with the directives.

Definition at line 1012 of file wrappers.py.

01012 
01013     def pragma(self):
01014         """The Pragma general-header field is used to include
01015         implementation-specific directives that might apply to any recipient
01016         along the request/response chain.  All pragma directives specify
01017         optional behavior from the viewpoint of the protocol; however, some
01018         systems MAY require that behavior be consistent with the directives.
01019         """
01020         return parse_set_header(self.environ.get('HTTP_PRAGMA', ''))
01021 

Here is the call graph for this function:


Member Data Documentation

Definition at line 989 of file wrappers.py.

Initial value:
environ_property('CONTENT_LENGTH', None, int, str, doc='''
     The Content-Length entity-header field indicates the size of the
     entity-body in bytes or, in the case of the HEAD method, the size of
     the entity-body that would have been sent had the request been a
     GET.''')

Definition at line 968 of file wrappers.py.

Initial value:
environ_property('CONTENT_TYPE', doc='''
     The Content-Type entity-header field indicates the media type of
     the entity-body sent to the recipient or, in the case of the HEAD
     method, the media type that would have been sent had the request
     been a GET.''')

Definition at line 963 of file wrappers.py.

Initial value:
environ_property('HTTP_DATE', None, parse_date, doc='''
    The Date general-header field represents the date and time at which
    the message was originated, having the same semantics as orig-date
    in RFC 822.''')

Definition at line 978 of file wrappers.py.

Initial value:
environ_property('HTTP_MAX_FORWARDS', None, int, doc='''
     The Max-Forwards request-header field provides a mechanism with the
     TRACE and OPTIONS methods to limit the number of proxies or gateways
     that can forward the request to the next inbound server.''')

Definition at line 982 of file wrappers.py.

Initial value:
environ_property('HTTP_REFERER', doc='''
    The Referer[sic] request-header field allows the client to specify,
    for the server's benefit, the address (URI) of the resource from which
    the Request-URI was obtained (the "referrer", although the header
    field is misspelled).''')

Definition at line 973 of file wrappers.py.


The documentation for this class was generated from the following file: