#32023: HttpRequest.headers doesn't get updated when request.META is updated.
-------------------------------+--------------------------------------
Reporter: lieryan | Owner: nobody
Type: New feature | Status: closed
Component: HTTP handling | Version: 3.1
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by Chris Wesseling):
Replying to [comment:2 Carlton Gibson]:
> I'd guess you'd be able to `del request.headers` to reset the property
in your test.
Modification of META is documented behaviour:
https://docs.djangoproject.com/en/dev/ref/request-
response/#django.http.HttpRequest.get_host
Shouldn't `request.META.__setitem__` and `request.META.__delitem__` `del
request.headers` to synchronize if the key starts with `"HTTP_"`? In the
current code, if any middleware has peeked into `request.headers`, the
data gets out of sync on mutation.
--
Ticket URL: <https://code.djangoproject.com/ticket/32023#comment:3>
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/0107018de552c96b-8f0f63d2-c864-41fa-a10f-99b548f85df9-000000%40eu-central-1.amazonses.com.