Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#13140 closed (fixed)

Test client doesn't pass **extra to _handle_redirects

Reported by: David Novakovic Owned by: nobody
Component: Testing framework Version: 1.1
Severity: Keywords: client, test
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hey. This problem occurs when using the test client in follow=True mode.

When accessing a view that does a redirect, the extra param in Client.get and friends is not passed to _handle_redirects.

To reproduce simply hit a view that does a redirect like this:

client.get('/dashboard/', follow=True, HTTP_HOST="localhost")

In this case the HTTP_HOST param does not make it through to the _handle_redirects call.

Cheers

Change History (3)

comment:1 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

(In [13620]) Fixed #13140 -- Ensure that request headers are preserved through redirect chains in the test client. Thanks to David Novakovic for the report.

comment:3 by Russell Keith-Magee, 14 years ago

(In [13621]) [1.2.X] Fixed #13140 -- Ensure that request headers are preserved through redirect chains in the test client. Thanks to David Novakovic for the report.

Backport of r13620 from trunk.

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