#31789: Add a cleaner interface for response headers
-------------------------------------+-------------------------------------
     Reporter:  Tom Carrick          |                    Owner:  Tom
         Type:                       |  Carrick
  Cleanup/optimization               |                   Status:  assigned
    Component:  HTTP handling        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Tom Carrick:

Old description:

> 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]

New description:

 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 PR]

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31789#comment:5>
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/065.8c863599a0596fe039afa4db448eb83d%40djangoproject.com.

Reply via email to