[Django] #29553: Test client handling of CONTENT_LENGTH is different from runserver and wsgi servers

5 views
Skip to first unread message

Django

unread,
Jul 9, 2018, 5:51:18 AM7/9/18
to django-...@googlegroups.com
#29553: Test client handling of CONTENT_LENGTH is different from runserver and wsgi
servers
-------------------------------------+-------------------------------------
Reporter: André | Owner: nobody
Cruz |
Type: Bug | Status: new
Component: Testing | Version: master
framework |
Severity: Normal | Keywords: test content_length
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
When using the Django test client:
{{{
(Pdb) type(request.META["CONTENT_LENGTH"])
<class 'int'>
}}}

When using runserver or other WSGI application servers:
{{{
(Pdb) type(request.META["CONTENT_LENGTH"])
<class 'str'>
}}}

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

Django

unread,
Jul 9, 2018, 10:27:05 AM7/9/18
to django-...@googlegroups.com
#29553: Test client should set Content-Length header to a string rather than
integer
-------------------------------------+------------------------------------
Reporter: André Cruz | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: test content_length | 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):

* has_patch: 0 => 1
* stage: Unreviewed => Accepted


Comment:

[https://github.com/django/django/pull/10159 PR]

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

Django

unread,
Jul 9, 2018, 11:45:10 AM7/9/18
to django-...@googlegroups.com
#29553: Test client should set Content-Length header to a string rather than
integer
-------------------------------------+------------------------------------
Reporter: André Cruz | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed
Keywords: test content_length | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"5bea8d256dcf98f6346786f8a4804b84fee5da27" 5bea8d2]:
{{{
#!CommitTicketReference repository=""
revision="5bea8d256dcf98f6346786f8a4804b84fee5da27"
Fixed #29553 -- Made test client set Content-Length header to a string
rather than integer.
}}}

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

Reply all
Reply to author
Forward
0 new messages