diff options
author | bbangert <devnull@localhost> | 2006-10-17 21:53:20 +0000 |
---|---|---|
committer | bbangert <devnull@localhost> | 2006-10-17 21:53:20 +0000 |
commit | d7ed34c94ad5dbafb3c21ae882c2c582c29e4d5f (patch) | |
tree | ec46c0240285b6771d3e321fa8976eef3c8df2fd /paste/wsgiwrappers.py | |
parent | b8498ced24fd43118e2026dd63d6410d93c0fdae (diff) | |
download | paste-d7ed34c94ad5dbafb3c21ae882c2c582c29e4d5f.tar.gz |
Removin the dict access, updating doc strings to indicate accurate methods.
Diffstat (limited to 'paste/wsgiwrappers.py')
-rw-r--r-- | paste/wsgiwrappers.py | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/paste/wsgiwrappers.py b/paste/wsgiwrappers.py index 228c374..c67431a 100644 --- a/paste/wsgiwrappers.py +++ b/paste/wsgiwrappers.py @@ -130,9 +130,7 @@ class WSGIRequest(object): _CHARSET_RE = re.compile(r'.*;\s*charset=(.*?)(;|$)', re.I) class WSGIResponse(object): - """ - A basic HTTP response, with content and dictionary-accessed headers - """ + """A basic HTTP response with content, headers, and out-bound cookies""" def __init__(self, content='', mimetype=None, code=200): self._iter = None self._is_str_iter = True @@ -152,8 +150,7 @@ class WSGIResponse(object): self.encoding_errors = 'strict' def __str__(self): - """ - Returns a rendition of the full HTTP message, including headers. + """Returns a rendition of the full HTTP message, including headers. When the content is an iterator, the actual content is replaced with the output of str(iterator) (to avoid exhausting the iterator). @@ -194,18 +191,6 @@ class WSGIResponse(object): elif is_file: return iter(lambda: self.content.read(), '') return self.get_content_as_string() - - def __setitem__(self, header, value): - self.headers[header] = value - - def __delitem__(self, header): - try: - del self.headers[header] - except KeyError: - pass - - def __getitem__(self, header): - return self.headers[header] def determine_encoding(self): """ |