Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14939 closed (fixed)

Django's Test Client strips out URL ;-parameters

Reported by: Andrew Godwin Owned by: Andrew Godwin
Component: Testing framework Version: dev
Severity: Keywords: urlparse parameters
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The parameters I'm referring to are the ones illustrated by this:

scheme://netloc/path;parameters?query#fragment

The test client code uses urlparse[2] to get the path component, while the main URL routing includes them. Thus, if I submit the url /works/23243/;include=artists via a normal HTTP connection, it works fine, but if I submit it via the test client, it gets truncated to /works/23243/.

Ideally, the two should be consistent; I propose doing this by making the test client include the parameter part.

Attachments (1)

ticket-14939-patch.diff (3.0 KB ) - added by Andrew Godwin 14 years ago.
Initial patch, without tests.

Download all attachments as: .zip

Change History (3)

by Andrew Godwin, 14 years ago

Attachment: ticket-14939-patch.diff added

Initial patch, without tests.

comment:1 by Andrew Godwin, 14 years ago

Resolution: fixed
Status: newclosed

(In [15027]) Fixed #14939: Don't strip ;-parameters from URLs in the test client.

comment:2 by Andrew Godwin, 14 years ago

(In [15045]) [1.2.X] Fixed #14939: Don't strip ;-parameters from URLs in the test client.

Backport of [15027] from trunk

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