[Django] #25048: Request headers that include underscore are missing from request META

34 views
Skip to first unread message

Django

unread,
Jul 2, 2015, 8:24:00 AM7/2/15
to django-...@googlegroups.com
#25048: Request headers that include underscore are missing from request META
-------------------------------+---------------------------------
Reporter: segalle | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 1.8
Severity: Normal | Keywords: request header meta
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+---------------------------------
When sending custom request header that include underscore string, it is
removed from the META dict on the request

for example:
I send the header: CUSTOM_HEADER and cant see it in the server side.
if i remove the underscore (CUSTOMHEADER) it appears again in the META
dict as HTTP_CUSTOMHEADER.

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

Django

unread,
Jul 2, 2015, 10:33:17 AM7/2/15
to django-...@googlegroups.com
#25048: Request headers that include underscore are missing from request META
-------------------------------------+-------------------------------------

Reporter: segalle | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 1.8
Severity: Normal | Resolution:

Keywords: request header meta | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

This is by design, see 316b8d49746933d1845d600314b002d9b64d3e3d. Should we
document it somewhere?

--
Ticket URL: <https://code.djangoproject.com/ticket/25048#comment:1>

Django

unread,
Jul 2, 2015, 1:12:35 PM7/2/15
to django-...@googlegroups.com
#25048: Request headers that include underscore are missing from request META
-------------------------------------+-------------------------------------

Reporter: segalle | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 1.8
Severity: Normal | Resolution:

Keywords: request header meta | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* Attachment "25048.diff" added.

Django

unread,
Jul 2, 2015, 1:13:03 PM7/2/15
to django-...@googlegroups.com
#25048: Request headers that include underscore are missing from request META
--------------------------------------+------------------------------------
Reporter: segalle | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:
Keywords: request header meta | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* component: HTTP handling => Documentation
* has_patch: 0 => 1
* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted


Comment:

Proposed doc patch attached.

--
Ticket URL: <https://code.djangoproject.com/ticket/25048#comment:2>

Django

unread,
Jul 9, 2015, 9:11:10 AM7/9/15
to django-...@googlegroups.com
#25048: Request headers that include underscore are missing from request META
--------------------------------------+------------------------------------
Reporter: segalle | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: request header meta | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"7b6d3104f263d9483982928604b2e51f06126ec1" 7b6d310]:
{{{
#!CommitTicketReference repository=""
revision="7b6d3104f263d9483982928604b2e51f06126ec1"
Fixed #25048 -- Documented that runservers strips headers with
underscores.

refs 316b8d49746933d1845d600314b002d9b64d3e3d
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25048#comment:3>

Django

unread,
Jul 9, 2015, 9:11:20 AM7/9/15
to django-...@googlegroups.com
#25048: Request headers that include underscore are missing from request META
--------------------------------------+------------------------------------
Reporter: segalle | Owner: nobody

Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: request header meta | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"340c410d58b3b760fe12dfd345799993fc3d3289" 340c410]:
{{{
#!CommitTicketReference repository=""
revision="340c410d58b3b760fe12dfd345799993fc3d3289"
[1.8.x] Fixed #25048 -- Documented that runservers strips headers with
underscores.

refs 316b8d49746933d1845d600314b002d9b64d3e3d

Backport of 7b6d3104f263d9483982928604b2e51f06126ec1 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25048#comment:4>

Reply all
Reply to author
Forward
0 new messages