Make HttpResponse.get work like dict.get
>>> from django import http
>>> resp = http.HttpResponse()
>>> resp['Connection'] = 'close'
>>> resp.get('Connection')
Traceback (most recent call last):
File "<console>", line 1, in <module>
TypeError: get() takes exactly 3 arguments (2 given)
>>> foo = {}
>>> foo.get('Connection')
>>>
Change History
(8)
Component: |
Uncategorized → HTTP handling
|
Owner: |
changed from nobody to anonymous
|
Status: |
new → assigned
|
Triage Stage: |
Unreviewed → Ready for checkin
|
Needs documentation: |
set
|
Needs tests: |
set
|
Triage Stage: |
Ready for checkin → Accepted
|
Severity: |
→ Normal
|
Type: |
→ New feature
|
Easy pickings: |
unset
|
Needs tests: |
unset
|
Needs documentation: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
UI/UX: |
unset
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
The docs say "To set or remove a header in your response, treat it like a dictionary". So I don't think this needs more documentation.
14020_with_tests.patch is obvious, has a test, applies cleanly to r16353 and passes all tests, so IMHO it's ready for checkin.