#27508: Default 404 page should show request.path_info instead of request.path
------------------------------------------------+------------------------
Reporter: Tzu-ping Chung | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
When I served a site under a prefix, and the site gets a 404, the default
(debug) page shows something like
{{{
Using the URLconf defined in ..., Django tried these URL patterns, in this
order:
1. ^foo/$
2. ^bar/whatever$
The current URL, prefix/foo/bar/, didn't match any of these.
}}}
The “The current URL” part shows the complete path, i.e. with the prefix I
served Django under. This is very confusing because Django does not
actually match it with the patterns. Looking into the code it seems the
404 handler (django.views.defaults.page_not_found) should use
request.path_info instead of request.path in its context.
--
Ticket URL: <https://code.djangoproject.com/ticket/27508>
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/051.c9c86fd9b5da1c726a54ddd12be6cef0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.