-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Querystring option #176
Querystring option #176
Conversation
…g values that is merged (taking precedence over) with the querystring passed in the uri string.
Also fixed what appears to be a bug in oAuth where the querystring will trump the request body. If this is deliberate then perhaps check for entries in the querystring rather than just it's existence since it is always going to exist now.
the also, it's unsafe to set properties on oAuth is dark voodoo that nobody really understands. it's unclear to me how signing should work if both the querystring and form body are present (which is a totally legal HTTP request). i would just leave oAuth alone and once someone is trying to use both querystring arguments and form bodies we can see how different servers react and tweak as necessary. |
…red to be conflicts with the qs = require('querystring'). These are no longer present though and must have been unrelated.
I'll need to have a think about the self.uri side of things. I want to support appending qs {} values to an existing querystring that was part of the uri. |
…oauth tests. This also lets me revert some of the changes I had to make to the test server and proxy tests
…ing request uri, instead it recreates a new one. This allows me to revert all the other changes I had to make previously and gives a nice clean commit that is self contained.
Ok I went away and thought about it a bit. The change is now self contained and much cleaner while still passing all tests. |
the patch looks great now but i'm wondering what the run.js is? we have a shell script that execs all the tests and can be executed using |
The current script is a bash script. I'm on windows here and it doesn't run. I can drop it from the commit if you like, but thought it might be of interest. |
good point. i'll take it but please remove the bash script, change package.json to use this, and change it to running a static list of files because people tend to keep tests that aren't passing in that directory without checking them in. |
… cross-platform. Also now based off a static list of files so failing tests can be kept in the tests folder while being worked on.
Done. Keep in mind this commit is now behind master a little and there are extra tests that will need to be added to static list in run.js. Rebase etiquette is something I still am a little unsure of, I read conflicting things about whether I should rebase, merge or leave it to the project owner a this point. |
if it merged cleanly i won't rebase, i'll just merge it now and then add the other tests in myself. |
#172
Took a stab at adding support for passing in a querystring option parameter.
First contribution to the project and I am still pretty new to Node, so happy to talk over any problems in code.
It got a bit interesting with oAuth, the oAuth code supports pulling its parameters from the body or the querystring, with the querystring taking preference with a basic truthy test. This looked wrong to me, but the change I have made would cause a change in functionality in certain circumstances.
Also included is a js based test runner if you want to point the npm test script at it. Running windows here, so needed something platform agnostic.