Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1752 (closed defect: wontfix)

Opened 11 years ago

Last modified 11 years ago

URL routing a little broken

Reported by: Linden Owned by: anonymous
Priority: normal Milestone: 2.0
Component: TurboGears Version: trunk
Severity: normal Keywords: hot_action url
Cc:

Description

So, with:

class RootController?(BaseController?):

movie = MovieController?()

When you browse to

 http://localhost:8080/movie/

everything's good, and it redirects you to

 http://localhost:8080/movie/list

but if you leave off the trailing slash and go to

 http://localhost:8080/movie

then it tries to redirect you to

 http://localhost:8080/list

which breaks. :( (Even worse, could send you to a working but incorrect page)

Change History

comment:1 Changed 11 years ago by mramm

  • Status changed from new to closed
  • Resolution set to wontfix

I actually think that you're describing the correct behavior for redirect. URL merges should not automatically add /'s to the url, because they can't know that is what you meant for it to do. I know this is different than the behavior in TG1, but 1) it more closely follows the specification, and 2) it's really not possible to change it due to a CGI specification issue (which is also true of the WSGI environ).

There's another ticket with a longer explanation of why this can't easily be fixed, and why it probably shouldn't.

Note: See TracTickets for help on using tickets.