Closed miyu closed 9 years ago
As a side-note, I made changes to all entry points that I saw using $_GET.
I don't think anyone will be upset if the code supports ?packageids=
(which is nonstandard) as well as ?packageIds=
.
Maybe put $_GET = array_change_key_case($_GET, CASE_LOWER);
in core.php
instead? I'm not really a fan of things that are repeated in multiple files.
Done.
IMO Moving the key transform to core.php hides the solution from where we use $_GET, so the code becomes less self-documenting. Maybe we should have a getter method to abstract this silliness away?
I think this is okay for now, ideally PHP wouldn't have superglobals like $_GET and instead have a nice HTTP abstraction (say something like Symfony's HttpFoundation) but it is what it is. I used PHP because it's simple and everywhere, not because it's a nice language. My server just doesn't have enough RAM to run more than a few Mono instances :P
This is necessary because Visual Studio 14 makes requests such as: GET /FindPackagesById()?Id='X.Y.Z' HTTP/1.1
Rather than the expected: GET /FindPackagesById()?id='X.Y.Z' HTTP/1.1
Before: http://puu.sh/dkaRB/2618631e63.png After: http://puu.sh/dkaTa/1b0623abf2.png