Bug #5182

Routing: @action should not be case sensitive

Added by Bastian Waidelich almost 12 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Must have
Category:
MVC
Start date:
2009-10-30
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

With the default routing setup, following is (and should be) possible:

http://localhost/TestInG/sTanDard/inDeX

However
http://localhost/testing/standard/Index

throws an exception
#1218473352: The action name must start with a lower case letter, "Index" does not match this criteria.

That should not happen.
I suggest to lower case all MVC parameters in the Router already, so that the request contains the same keys independently from the spelling.
Patch follows


Files


Related issues

Related to TYPO3.Flow - Feature #2237: URLs can only be lowercaseResolvedKarsten Dambekalns2008-11-27

Actions
#1

Updated by Bastian Waidelich almost 12 years ago

Attached patch fixes the issue by lower-casing all MVC parameters (@package, @subpackage, @controller & @action) before storing them in the request object.
Note: @format is not lower cased yet, cause I'm not sure about the implications: Maybe someone wants to have somethink like "http://localhost/myroute.RSS" - does that make sense?

#2

Updated by Bastian Waidelich almost 12 years ago

v2 of the patch also lower cases format and uses native strtolower() instead of the PHP6-methods, as discussed with Karsten

#4

Updated by Karsten Dambekalns almost 12 years ago

Bastian Waidelich wrote:

uses native strtolower() instead of the PHP6-methods, as discussed with Karsten

The rationale (for the record): Since those parts (package key, controller, action) reflect class and method names they cannot be unicode in PHP currently. As soon as they can be, strtolower() can be expected to be able to deal with that.

#5

Updated by Karsten Dambekalns almost 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3384.

Also available in: Atom PDF