diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-10-20 03:32:21 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-10-20 03:32:21 +0000 |
| commit | b6ec8d3a9ef9315a947535bf99f5e92ae40ce99e (patch) | |
| tree | b8b9647184a5ae7ae685952febf55fd362eb094f /django/http | |
| parent | ad91f6889daa1744ad422f5e73f2494212c1b7e8 (diff) | |
Changed HttpResponse.get() to lower case the header value before looking it up. This makes it consistent will other header accesses. Fixed #5754, #5772.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http')
| -rw-r--r-- | django/http/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py index 508c6d2f3e..d2e1ca0b39 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -289,12 +289,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) + return self._headers.get(header.lower(), alternate) def set_cookie(self, key, value='', max_age=None, expires=None, path='/', domain=None, secure=None): self.cookies[key] = value |
