$_GET variables passed to controller as lowercase |
[eluser]zapada[/eluser]
If i go to site.com/controller/function/StRiNg, the paramater is fetched as lowercase. Is there any way to have it fetched without making it lowercase? Thanks.
[eluser]garymardell[/eluser]
Want the short answer or the long? Short answer is no Long answer is nope ![]()
[eluser]coolfactor[/eluser]
Uppercase and Lowercase works fine, but you're probably running into 1 of 2 possibilities. 1) your server is doing the rewriting - less likely 2) CodeIngiter's XSS/Validation/Security system is lower-casing the parameters - more likely
[eluser]coolfactor[/eluser]
[quote author="gazza" date="1187217835"] ![]() The host name and the rest of the url are different beasts. The host name is usually lower-cased, but the rest of the url won't be. Try this link: http://CodeIgniter.Com/FoRums/viEwthRead/58679/ EDIT - wow, that link is invalid. Well, bygollygee, what the heck? I've never run into that before. I didn't know CodeIgniter cared about the case of the controller/function segments, but I guess it does. The rest of the segments should work fine as upper or lowercase, though.
[eluser]coolfactor[/eluser]
[quote author="zapada" date="1187216962"]If i go to site.com/controller/function/StRiNg, the paramater is fetched as lowercase. Is there any way to have it fetched without making it lowercase? Thanks.[/quote] By the way, this is not a $_GET variable... this is an url segment. Yes, it's a GET request, but there's no variables being passed with the request.
[eluser]Skulls[/eluser]
this problem is similar to the calling of a file from a webserver. i had lots of free hosting domains that ran under linux and had problems diplaying an image if it was called like img src=my_image.jpg and the image was named like my_image.JPG. i was messing around with image editors and didn't care about that until i was uploading the whole site :d (i was working on windows and the problem didn't appear) maybe it has something to do with the configuration of the webserver
[eluser]coolfactor[/eluser]
Correct. Windows is not case-sensitive, but Linux is. It makes sense when accessing regular files, but I didn't realize CodeIgniter cared when figuring out the Controller and Function to call, but obviously it does matter.
[eluser]zapada[/eluser]
[quote author="coolfactor" date="1187218576"]Uppercase and Lowercase works fine, but you're probably running into 1 of 2 possibilities. 1) your server is doing the rewriting - less likely 2) CodeIngiter's XSS/Validation/Security system is lower-casing the parameters - more likely[/quote] Yeah, I'm pretty sure it's #2. Is there a way to easily fix that (and still have xss/validation/security filter)? |
Welcome Guest, Not a member yet? Register Sign In |