Home | Trees | Indices | Help |
|
---|
|
object --+ | Entity --+ | Part
A MIME part entity, part of a multipart entity.
|
|||
Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
|
|||
|
|
|||
attempt_charsets =
A list of strings, each of which should be a known encoding. |
|||
boundary = None The MIME multipart boundary. |
|||
default_content_type =
This defines a default ``Content-Type`` to use if no Content-Type header is given. |
|||
maxrambytes = 1000 The threshold of bytes after which point the ``Part`` will store its data in a file (generated by :func:`make_file<cherrypy._cprequest.Entity.make_file>`) instead of a string. |
|||
Inherited from |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
Read bytes from self.fp and return or write them to a file. If the 'fp_out' argument is None (the default), all bytes read are returned in a single byte string. If the 'fp_out' argument is not None, it must be a file-like object that supports the 'write' method; all bytes read will be written to the fp, and that fp is returned. |
Called if a more-specific processor is not found for the ``Content-Type``.
|
Read the request body into fp_out (or make_file() if None). Return fp_out.
|
|
attempt_charsetsA list of strings, each of which should be a known encoding. When the Content-Type of the request body warrants it, each of the given encodings will be tried in order. The first one to successfully decode the entity without raising an error is stored as :attr:`entity.charset<cherrypy._cpreqbody.Entity.charset>`. This defaults to ``['utf-8']`` (plus 'ISO-8859-1' for "text/\*" types, as required by `HTTP/1.1 <http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1>`_), but ``['us-ascii', 'utf-8']`` for multipart parts.
|
default_content_typeThis defines a default ``Content-Type`` to use if no Content-Type header is given. The empty string is used for RequestBody, which results in the request body not being read or parsed at all. This is by design; a missing ``Content-Type`` header in the HTTP request entity is an error at best, and a security hole at worst. For multipart parts, however (this class), the MIME spec declares that a part with no Content-Type defaults to "text/plain".
|
maxrambytesThe threshold of bytes after which point the ``Part`` will store its data in a file (generated by :func:`make_file<cherrypy._cprequest.Entity.make_file>`) instead of a string. Defaults to 1000, just like the :mod:`cgi` module in Python's standard library.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Jul 22 03:35:33 2015 | http://epydoc.sourceforge.net |