For instance, the user first requests /students/. This raises an
HTTPRedirect to 'contact'. However, instead of taking the user to
/students/contact like I would expect it to, they are redirected to
/contact. I have tracked this problem down to the url function in
__init__.py. Apparently this function will automatically strip a
trailing slash from the current url if the call is not being handled by
an index function, which it isn't because its a default handler. This
causes the result of cherrypy.url (which is called in the HTTPRedirect
__init__ function) to return /students (note the lack of a trailing
slash). _urljoin then removes the 'students' part of the url, and the
end url is /contact.
Basically, I know exactly what the problem is and what is causing it,
but my question is whether or not this is supposed to happen. I'm
considering filing a bug regarding this, but I wanted to check first
that this isn't the desired behavior.
The way I consider fixing this issue is to make a default handler set
the is_index attribute on a request. This would make cherrypy.url keep
the trailing slash so that the redirect would work correctly.
I can write a patch to do this, I just need to make sure that this is a
bug.
Thanks,
Connor
This looks like a bug to me. A ticket would be great!
Robert Brewer
System Architect
Amor Ministries
fuma...@amor.org
Hmm, maybe I'm just being dumb and can't find it, but I can't figure out how to create an account in the trac to submit a ticket. I keep just getting permission denied errors when I go to the newticket page...