#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)
Change History (3)
by , 15 years ago
| Attachment: | ticket-14939-patch.diff added | 
|---|
comment:1 by , 15 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | new → closed | 
comment:2 by , 15 years ago
  Note:
 See   TracTickets
 for help on using tickets.
    
Initial patch, without tests.