#31810: HttpRequest.headers doesn't contain headers without HTTP prefix.
-------------------------------+--------------------------------------
Reporter: bcail | Owner: nobody
Type: Uncategorized | Status: closed
Component: HTTP handling | Version: master
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by felixxm):
* status: new => closed
* resolution: => invalid
* component: Testing framework => HTTP handling
Comment:
You're trying to pass a custom header without HTTP prefix but
`HttpRequest.headers` contains only HTTP-prefixed headers, see
[https://docs.djangoproject.com/en/stable/ref/request-
response/#django.http.HttpRequest.headers documentation]. It's by design.
This has nothing to do with test `Client`. For example:
{{{
self.client.get('/request_headers/', HTTP_someheader='some header value')
}}}
works.
--
Ticket URL: <https://code.djangoproject.com/ticket/31810#comment:1>
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/063.6a565009ce154374c939c69e1bde2280%40djangoproject.com.