#26812: APPEND_SLASH doesn't work with URLs that have query strings
----------------------------------+--------------------------------------
     Reporter:  Andrzej Winnicki  |                    Owner:  nobody
         Type:  Uncategorized     |                   Status:  new
    Component:  HTTP handling     |                  Version:  1.10
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Changes (by Sven Engström):

 * status:  closed => new
 * version:  1.9 => 1.10
 * resolution:  wontfix =>


Comment:

 The problem is the inconsistency in CommonMiddleware between
 `should_redirect_with_slash` and `get_full_path_with_slash` (with
 `force_append_slash=True`) where the first checks if the url including
 query string ends with a slash and the later adds a slash between the path
 and the query string.

 In my opinion the best way to solve this is to replace
 `request.get_full_path().endswith('/')` with
 `request.path_info.endswith('/')` in `should_redirect_with_slash`.

--
Ticket URL: <https://code.djangoproject.com/ticket/26812#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.3ce9a40b9f22d44d2360a911a4316c64%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to