Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14939 closed (fixed)

Django's Test Client strips out URL ;-parameters

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


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


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 andrewgodwin 3 years ago.
Initial patch, without tests.

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by andrewgodwin

Initial patch, without tests.

comment:1 Changed 3 years ago by andrewgodwin

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:2 Changed 3 years ago by andrewgodwin

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

Backport of [15027] from trunk

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.