digitallyinduced / ihp

🔥 The fastest way to build type safe web apps. IHP is a new batteries-included web framework optimized for longterm productivity and programmer happiness
https://ihp.digitallyinduced.com/
MIT License
4.89k stars 194 forks source link

Alternative capitalization for URLs #208

Open nezbite opened 4 years ago

nezbite commented 4 years ago

When accessing a site with wrong capitalization, e.g. example.com/posts instead of example.com/Posts an "Action is missing" error is shown. Instead, we should check if an Action exists with another way of capitalization before showing an error. Examples: /posts -> /Posts /POSTS -> /Posts /pOSTS -> /Posts etc.

hendi commented 4 years ago

Redirecting based on some fuzzy matching algorithm should be avoided IMHO.

In dev mode, the error page should show "similar" named actions though.

parry84 commented 3 years ago

But the path section of the URL is supposed to be case-sensitive: check section 6.2.2.1 of https://tools.ietf.org/html/rfc3986

Hence the current behavior is correct.