#29553 closed Bug (fixed)

Test client should set Content-Length header to a string rather than integer

Reported by: André Cruz Owned by: nobody
Component: Testing framework Version: master
Severity: Normal Keywords: test content_length
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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

Change History (2)

comment:1 Changed 15 months ago by Tim Graham

Has patch: set
Summary: Test client handling of CONTENT_LENGTH is different from runserver and wsgi serversTest client should set Content-Length header to a string rather than integer
Triage Stage: UnreviewedAccepted

comment:2 Changed 15 months ago by GitHub <noreply@…>

Resolution: fixed
Status: newclosed

In 5bea8d2:

Fixed #29553 -- Made test client set Content-Length header to a string rather than integer.

Note: See TracTickets for help on using tickets.
Back to Top