Add a cleaner interface for response headers
This proposal is to replace HttpResponse._headers with HttpResponse.headers as a public interface using a variation of django.utils.datasctructures.CaseInsensitiveMapping.
It also includes updating tests and documentation to use this, rather than the old dict-like interface, i.e. response.headers['Content-Type'] = 'application/json' response['Content-Type'] = 'application/json'.
The dict-like interface won't be deprecated, but will become undocumented, and tests added purely for backwards-compatibility.
Mailing list
PR
Change History
(7)
| Owner: |
changed from nobody to Tom Carrick
|
| Status: |
new → assigned
|
| Needs documentation: |
set
|
| Needs tests: |
set
|
| Needs documentation: |
unset
|
| Needs tests: |
unset
|
| Version: |
3.0 → master
|
| Triage Stage: |
Unreviewed → Accepted
|
| Description: |
modified (diff)
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
I believe this should be accepted