-
Notifications
You must be signed in to change notification settings - Fork 357
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
UriResolver::generate does not properly reconstruct URLs with a query fragment. #424
Comments
erayd
added a commit
to erayd/json-schema
that referenced
this issue
May 18, 2017
Note that this bugfix will cause empty query strings to be dropped (e.g. http://example.com?#blue becomes http://example.com#blue). This is because the '?' character is deliberately not captured as part of the query string, and the testsuite expects to be able to pass an empty query string and *not* have the '?' added for that case.
Thanks for the bug report! This is fixed in #425. I will backport the fix for 5.2.2 once it's merged. |
Fantastic, thank you! |
bighappyface
pushed a commit
that referenced
this issue
Jun 5, 2017
Note that this bugfix will cause empty query strings to be dropped (e.g. http://example.com?#blue becomes http://example.com#blue). This is because the '?' character is deliberately not captured as part of the query string, and the testsuite expects to be able to pass an empty query string and *not* have the '?' added for that case.
erayd
added a commit
to erayd/json-schema
that referenced
this issue
Jun 5, 2017
Note that this bugfix will cause empty query strings to be dropped (e.g. http://example.com?#blue becomes http://example.com#blue). This is because the '?' character is deliberately not captured as part of the query string, and the testsuite expects to be able to pass an empty query string and *not* have the '?' added for that case.
bighappyface
pushed a commit
that referenced
this issue
Jun 5, 2017
* Remove PHPDocumentor & change travis platform for hhvm tests (#429) * Remove dev-time dependency on phpdocumentor due to resolution headaches * Switch distro for hhvm testing to trusty (precise now unsupported) * Bugfix for #424 - add '?' for query string (#425) Note that this bugfix will cause empty query strings to be dropped (e.g. http://example.com?#blue becomes http://example.com#blue). This is because the '?' character is deliberately not captured as part of the query string, and the testsuite expects to be able to pass an empty query string and *not* have the '?' added for that case.
Closed with #425 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
UriResolver
appends the fragment to the path without a leading?
causing an incorrect URL.Ex:
http://example.org/?rest=/route
becomeshttp://example.org/rest=/route
.https://github.com/justinrainbow/json-schema/blob/master/src/JsonSchema/Uri/UriResolver.php#L65
Happy to submit a patch.
The text was updated successfully, but these errors were encountered: