fix: unnecessary lowercasing parameters #2877
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related:
Issue
When using
URLHelper::get_params()
, everything is normalised to lowercase. I understand why you would do that with URLs, but in this specific instance it is about parameters. I think the author of the issue raises a valid point that case sensitive parameters are valid. The RFC only speaks of normalising the protocol and scheme: https://www.rfc-editor.org/rfc/rfc3986#page-11Solution
I removed the
strtolower
. (And fixed a small typo earlier in the file)Impact
If some code is relying on this method also turning everything into lowercase for them, that would break.
Usage Changes
Developers should put
strtolower
around the output if they need that.Considerations
I realise it is a breaking change, and therefore not ideal. I am however convinced that the original solution is the actual breaking thing here.
Testing
All existing tests were already lowercase.