#31789: Add a cleaner interface for response headers
------------------------------------------------+------------------------
               Reporter:  Tom Carrick           |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  HTTP handling         |        Version:  3.0
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  1
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 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.

 [https://groups.google.com/u/2/g/django-developers/c/rlt1HhEaPaM Mailing
 list]
 [https://github.com/django/django/pull/13186 Draft PR]

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31789>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.6515f4992f4a0bfb027dc9517d64b820%40djangoproject.com.

Reply via email to