Opened 6 years ago

Closed 6 years ago

#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: dev
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 by Tim Graham, 6 years ago

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 by GitHub <noreply@…>, 6 years ago

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