Bug #5182

Routing: @action should not be case sensitive

Added by Bastian Waidelich almost 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-10-30
Priority:Must have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:MVC
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 6
PHP Version: Complexity:
Has patch: Affected Flow version:

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

5182_action_should_not_be_case_sensitive.patch Magnifier (6.2 kB) Bastian Waidelich, 2009-10-30 13:37

5182_action_should_not_be_case_sensitive_v2.patch Magnifier (6.9 kB) Bastian Waidelich, 2009-10-30 14:13

5182_action_should_not_be_case_sensitive_v3.patch Magnifier (6.1 kB) Bastian Waidelich, 2009-10-30 14:16


Related issues

related to TYPO3.Flow - Feature #2237: URLs can only be lowercase Resolved 2008-11-27

Associated revisions

Revision a11f255e
Added by Karsten Dambekalns almost 6 years ago

[+BUGFIX] FLOW3 (MVC): MVC parameters (package key, controller name, action name, format) are now lowercased before set in the request, fixes #5182.

History

#1 Updated by Bastian Waidelich almost 6 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 6 years ago

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

#3 Updated by Bastian Waidelich almost 6 years ago

v2 contained changes from another patch, sorry.

#4 Updated by Karsten Dambekalns almost 6 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 6 years ago

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

Applied in changeset r3384.

Also available in: Atom PDF