Bug #5182
Routing: @action should not be case sensitive
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
Related issues
Associated revisions
[+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
- File 5182_action_should_not_be_case_sensitive.patch added
- Assigned To changed from Bastian Waidelich to Karsten Dambekalns
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
- File 5182_action_should_not_be_case_sensitive_v2.patch added
- Target version set to 1.0 alpha 6
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.