diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2007-09-14 22:33:56 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2007-09-14 22:33:56 +0000 |
| commit | ca9388cdaf905e12560c751ca55f8237303e4494 (patch) | |
| tree | 9d83a5a092579c27167bc2be5d2ae1f7f7b9657d /django/http | |
| parent | 71796410ba8e292a39610a4435f7693ca37b4289 (diff) | |
Added more dict-like methods to HttpResponse as part of the response.headers -> response._headers move, and fixed a few direct uses of response.headers in Django itself. Thanks to PhiR for tracking down and slaying these bugs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http')
| -rw-r--r-- | django/http/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py index 1de0ffb1df..1b80237290 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -274,6 +274,12 @@ class HttpResponse(object): return self._headers.has_key(header.lower()) __contains__ = has_header + + def items(self): + return self._headers.items() + + def get(self, header, alternate): + return self._headers.get(header, alternate) def set_cookie(self, key, value='', max_age=None, expires=None, path='/', domain=None, secure=None): self.cookies[key] = value |
