-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Url-escaped slash prefixed to normalised path #67
Comments
(Sorry, I'd write a proper test-case and dig into the code and offer a PR but I'm really busy 😿) |
I have found the culprit 👍 https://github.com/thephpleague/uri/blob/master/src/Types/ImmutableComponentTrait.php#L109 the bug appears because depending on context the |
- remove buggy internal ImmutableComponentTrait::getReservedRegex method - remove unused internal static variable $characters_set_encoded - remove static variable $characters_set To fix the issue and keep the speed improvement, all Path related component classes are now encoded/decoded using the same mechanism/code. - PathTrait::encodePath and PathTrait::decodePath are added. - internal static variable representing the regular expression of the path reserved characters is used
- remove buggy internal ImmutableComponentTrait::getReservedRegex method - remove unused internal static variable $characters_set_encoded - remove static variable $characters_set To fix the issue and keep the speed improvement, all Path related component classes are now encoded/decoded using the same mechanism/code. - PathTrait::encodePath and PathTrait::decodePath are added. - internal static variable representing the regular expression of the path reserved characters is used
The bug fix is now merge on the master branch. I'll close this issue when the new release will be tagged |
Fantastic, thank you! |
version 4.1.1 is released with the bug fix |
Bit of an odd one:
Currently outputs:
An extra
%2F
has snuck in right after the host and initial slash.The text was updated successfully, but these errors were encountered: