Opened 16 years ago

Last modified 16 years ago

#9397 closed

weird HttpResponseRedirect reaction to url — at Initial Version

Reported by: billychasen Owned by: nobody
Component: HTTP handling Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If I have a url defined, such as:

(r'hello$', 'mysite.index.views.hello')

and let's say I have a page on http://mysite.net that redirects via HttpResponseRedirect(reverse('mysite.index.views.hello'))

If I am at http://www.mysite.net -- it correctly goes to http://www.mysites.net/hello
If I am at http://mysite.net (no www) -- it redirects to http://mysite.net/.net/hello

It's easily fixed by changing the url definition to

(r'hello/$', 'mysite.index.views.hello') (adding a trailing forward slash)

Seems to me though, that this shouldn't be required (seems a little buggy and took awhile to track down)

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top