HTTPLengthRequired


Attributes

a content_length

<Converted <Proxy for header Content-Length> int>

a code

411

a vary

<Converted <Proxy for header Vary> list>

a title

'Length Required'

a location

Retrieve the Location header of the response, or None if there is no header. If the header is not absolute and this response is associated with a request, make the header absolute.

For more information see section 14.30.

a accept_ranges

<Proxy for header Accept-Ranges>

a server

<Proxy for header Server>

a html_template_obj

<string.Template object at 0x86dbb0c>

a body

The body of the response, as a str. This will read in the entire app_iter if necessary.

a status_int

The status as an integer

a etag

<Proxy for header ETag>

a content_range

<Converted <Proxy for header Content-Range> ContentRange object>

a template

'%(explanation)s\r\n<br/>%(detail)s\r\n<!-- %(comment)s -->'

a content_md5

<Proxy for header Content-MD5>

a required_headers

()

a last_modified

<Converted <Proxy for header Last-Modified> HTTP date>

a comment

''

a unicode_body

Get/set the unicode value of the body (using the charset of the Content-Type)

a retry_after

<Converted <Proxy for header Retry-After> HTTP date or delta seconds>

a content_language

<Converted <Proxy for header Content-Language> list>

a content_location

<Proxy for header Content-Location>

a default_charset

'UTF-8'

a default_content_type

'text/html'

a app_iter

Returns the app_iter of the response.

If body was set, this will create an app_iter from that body (a single-item list)

a content_encoding

<Proxy for header Content-Encoding>

a cache_control

Get/set/modify the Cache-Control header (section 14.9)

a body_template_obj

<string.Template object at 0x86dbb2c>

a explanation

'Content-Length header required.'

a empty_body

False

a content_type

Get/set the Content-Type header (or None), without the charset or any parameters.

If you include parameters (or ; at all) when setting the content_type, any existing parameters will be deleted; otherwise they will be preserved.

a exception

<property object at 0x88294b4>

a default_conditional_response

False

a headers

The headers in a dictionary-like object

a pragma

<Proxy for header Pragma>

a body_file

Returns a file-like object that can be used to write to the body. If you passed in a list app_iter, that app_iter will be modified by writes.

a wsgi_response

<property object at 0x8829874>

a charset

Get/set the charset (in the Content-Type)

a detail

''

a status

The status string

a expires

<Converted <Proxy for header Expires> HTTP date>

a date

<Converted <Proxy for header Date> HTTP date>

a content_type_params

Returns a dictionary of all the parameters in the content type.

a age

<Converted <Proxy for header Age> int>

a request

Return the request associated with this response if any.

a plain_template_obj

<string.Template object at 0x86dbacc>

a headerlist

The list of response headers

a environ

Get/set the request environ associated with this response, if any.

a allow

<Converted <Proxy for header Allow> list>

Methods

f __getitem__(...) ...

f __init__(self, detail=None, headers=None, comment=None, body_template=None) ...

f plain_body(self, environ) ...

f html_body(self, environ) ...

f generate_response(self, environ, start_response) ...

f __call__(self, environ, start_response) ...

See the source for more information.