Skip to content

Commit

Permalink
[fix] Allow arrays to be send as request body.
Browse files Browse the repository at this point in the history
I assumed that the Array.isArray check was used to ensure that we are not sending
the uri arguments to the server. Checking if they equeal the uri should solve this.
  • Loading branch information
3rd-Eden committed Jan 3, 2013
1 parent 255e42e commit ba29f06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node.js/lib/client/client.js
Expand Up @@ -46,7 +46,7 @@ Client.prototype.request = function (method, uri /* variable arguments */) {
var options, args = Array.prototype.slice.call(arguments),
success = args.pop(),
callback = args.pop(),
body = typeof args[args.length - 1] === 'object' && !Array.isArray(args[args.length - 1]) && args.pop(),
body = typeof args[args.length - 1] === 'object' && args[args.length - 1] !== uri && args.pop(),
encoded = new Buffer(this.options.get('username') + ':' + this.options.get('password')).toString('base64'),
proxy = this.options.get('proxy');

Expand Down

0 comments on commit ba29f06

Please sign in to comment.