#18495: 404 with non-/ WSGI, script prefix not removed in core/urlresolvers.py: resolve() -------------------------------------+------------------------------------- Reporter: django@… | Owner: nobody Type: Bug | Status: closed Component: Core (URLs) | Version: 1.4 Severity: Normal | Resolution: invalid Keywords: 404, | Triage Stage: WSGIScriptAlias, wsgi, resolve, | Unreviewed url, prefix | Needs documentation: 0 Has patch: 1 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+------------------------------------- Changes (by lukeplant):
* status: new => closed * resolution: => invalid Comment: Having dug into the code, I'm finding it difficult to believe this bug report. The only thing passed to the URL resolving mechanism is 'request.path_info': https://github.com/django/django/blob/4a103086d5c67fa4fcc53c106c9fdf644c742dd8/django/core/handlers/base.py#L102 This, in turn, comes straight from `environ['PATH_INFO']`: https://github.com/django/django/blob/4a103086d5c67fa4fcc53c106c9fdf644c742dd8/django/core/handlers/wsgi.py#L127 And you are saying that PATH_INFO is sent correctly by Apache/modwsgi, so I can't see what could be going wrong. It's difficult to see how `new_path` could ever be `'test/bug/'` as you claim. The proposed fix is certainly wrong - we don't need the script name at all at this point in the URL resolving process, it shouldn't be a part of the path that is being matched at all. The only possible bug I can see so far is that the debugging page is not reporting the 'actual URL' it was testing. However, this is a difficult thing to express concisely, since you've got different definitions of the 'actual URL' - the PATH_INFO that Django is matching against (`/bug/`), the full URL from the client (`/test/bug/`), and the URL minus the initial `/` (`bug/`) which is used in the error message, due to the fact that the RegexURLResolver matches this initial slash automatically. The message is as helpful as it can be in the normal case. However, if you could supply a test that uses the test client (which itself uses the WSGIRequest class) that would allow us to verify what you are talking about, or some other analysis so that we can see what is going on, I will certainly believe you. Please do re-open if you can provide this information, I'm closing INVALID for now. -- Ticket URL: <https://code.djangoproject.com/ticket/18495#comment:2> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.