Code

Opened 3 years ago

Closed 3 years ago

#15690 closed (invalid)

HttpRequest path should be in a stable order

Reported by: jdunck Owned by: nobody
Component: Core (Other) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

If Request.get_full_path and friends returned querystring in a stable (not browser-specified) order, it could be more easily used for cache key input.

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by lukeplant

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

No - they should leave the query string in the same order as the browser specified, because changing the order can potentially change the meaning of the query. That might be unusual, but I'm not aware of any RFC that would forbid it. In fact there is no requirement that a querystring has to be name value pairs at all - that is how they are used by browsers for encoding GET forms, but there is no HTTP requirement that they should be used that way. At this level, Django should be treating the query string as opaque.

Trac happens to use URLs where the order of query parameters matters a lot e.g. this report

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.