-
Notifications
You must be signed in to change notification settings - Fork 38
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
Incorrect encoding of (pagination) query parameters #97
Comments
Thanks for the report! I added the referenced commit to fix the issue. Please confirm that it works for you, and I'll release it in v 4.2.0. |
I finally took the time to go through all of the unreleased changes :) (sorry for taking so long):
So I can't wait for the 4.2.0 release :) |
Thanks for the idea, I certainly forgot about checking the method. However, I went with checking for the methods that shouldn't have a body ( |
The problem is, that there are more (less popular?) methods that exist... for example Symfony uses the following list:
Source: https://github.com/symfony/http-foundation/blob/5.x/Request.php#L55-L64 That's why I chose to whitelist instead of blacklist because I know I want to do the check for those methods. |
Ah, in the meanwhile I posted another comment, but in the linked issue (deleted since then), so I re-post it here:
|
At first that was what I wanted to do, but there was no hasBody() and was not really sure if that was the way to go anyways. |
I believe this is is incorrect:
The above method called with
foobar
and10
results in:page%5Bcursor%5D%3Dfoobar&page%5Bsize%5D%3D10
.As you can see it also encodes the
=
. I think usinghttp_build_query
(doc) might be the solution instead? Do you agree?Source: https://github.com/woohoolabs/yin/blob/master/src/JsonApi/Request/Pagination/CursorBasedPagination.php#L61
The text was updated successfully, but these errors were encountered: