Closed horiaradu closed 7 years ago
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."
Can one of the admins verify this patch?
Can one of the admins verify this patch?
Can one of the admins verify this patch?
Any updates on this one?
ok to test
none of the tests you added are passing on my machine
@slnode test please
@horiaradu, the change that was made in this PR only affects the behavior of a GET
request, where the source of the argument has not been defined, ie the default GET
request behavior. Shouldn't we put this change in for any argument sourced from the query string?
Also, what happens if typeof accept.type === 'object'
and typeof val === 'object'
? You're still coercing the object into a string. Are you saying that any argument coming from the query should be a string? I don't necessarily disagree, I just want to clarify.
@richardpringle
What I want to accomplish is to serialize objects as strings when they need to go into the query string.
I only affected the GET request since I encountered this bug when I connected to a loopback API (as described here) and only GET requests were used. I don't have enough knowledge of strong-remoting to know how the other requests are affected, but I can gladly try to help out in order to make this more generic.
We should definitely make sure that the change is uniform and that any object parsed from the query string is coerced properly.
If you could test the expected behaviour is the same for multiple verbs (GET and POST for example), that would be ideal.
I will replicate the tests for other verbs as well.
On Thu, Aug 25, 2016 at 8:21 PM, Richard Pringle notifications@github.com wrote:
We should definitely make sure that the change is uniform and that any object parsed from the query string is coerced properly.
If you could test the expected behaviour is the same for multiple verbs (GET and POST for example), that would be ideal.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/strongloop/strong-remoting/pull/325#issuecomment-242471066, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_QOApzltVLd6uM2vXbQncBV-8d1zoWks5qjc8zgaJpZM4JRpHd .
any reason why this is not merged ?
@thaiat
any reason why this is not merged ?
Looks like there's pending item on this PR. Also, has merge conflicts.
@horiaradu : Can you please advise if you were able to finish:
I will replicate the tests for other verbs as well.
Please resolve merge conflicts as well.
I will resolve the conflicts asap.
On Wed, Oct 19, 2016 at 9:27 PM, Gunjan Pandya notifications@github.com wrote:
@thaiat https://github.com/thaiat
any reason why this is not merged ?
Looks like there's pending item on this PR. Also, has merge conflicts.
@horiaradu https://github.com/horiaradu : Can you please advise if you were able to finish:
I will replicate the tests for other verbs as well.
Please resolve merge conflicts as well.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/strongloop/strong-remoting/pull/325#issuecomment-254899773, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_QOLNjmKytFtxN-b4XZc764YaWwoYHks5q1mESgaJpZM4JRpHd .
@gunjpan I've updated the PR.
Check it out and let me know if I have to fix other things.
@slnode ok to test
this should be ported back to latest 2.x version of strong-remoting as well
I can take care of that after this PR is merged.
@horiaradu i needed that in my code asap so i did it there in case that helps you #377
Looks like CI is stuck. Restarting tests.
@slnode test please
I would want to include the functionality with the unit tests as well so I will just cherry pick the commit.
On Mon, Oct 24, 2016 at 4:30 PM, Gunjan Pandya notifications@github.com wrote:
Looks like CI is stuck. Restarting tests.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/strongloop/strong-remoting/pull/325#issuecomment-255740703, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_QOEjOel-j5hl1v240DDbN2ZsyU5Seks5q3LLzgaJpZM4JRpHd .
I see that this PR appeared on the same topic: https://github.com/strongloop/strong-remoting/pull/378
Can somebody take care of this PR? It's been here for a while now...
@horiaradu I see @gunjpan is taking care of reviewing this PR. However before that you need to resolve merge conflicts. If this PR gets landed we can close https://github.com/strongloop/strong-remoting/pull/378
Thanks!
I don't see any conflicts...
I don't see any conflicts...
Oh it says:
This branch is out-of-date with the base branch
I believe you need to rebase it on top of master.
done.
@gunjpan could you PTAL.
@horiaradu : I found pull #378 more concise and generalized, because JSON.stringify()
would retain numbers as numbers: From node REPL:
> console.log(JSON.stringify({a: 2}))
{"a":2}
@bajtos : Thoughts?
@gunjpan
EDIT:
I've made the changes you suggested.
@horiaradu : I found pull #378 more concise and generalized, because
JSON.stringify()
would retain numbers as numbers: From node REPL:console.log(JSON.stringify({a: 2})) {"a":2}
@bajtos : Thoughts?
I think #378 goes in a wrong direction. What happens when the argument value is a string? I think we will end up with ?key="value"
in the query, which is definitely not wanted.
> JSON.stringify('text')
'"text"'
This patch looks good to me as it is now, I think the only remaining step is to squash the commits to a single one with a good commit message (guidelines). I'll leave the final call to @gunjpan.
@bajtos : I see, thank you for clarifying the case of string
@horiaradu : PTAL at @bajtos' comments above. I'll further review your edits today. Thank you.
@gunjpan done
@gunjpan check it out.
I will backport this to 2.X and create a PR as soon as this is merged.
@horiaradu : Landed. Please backport it against 2.x
, and ping me for review. Thank you :)
Stringify query params which are objects in a way in which empty ararys are preserved instead of removed (default querystring implementation).
fix: https://github.com/strongloop/strong-remoting/issues/324