Skip to content
Permalink
Browse files

[fix] Allow arrays to be send as request body.

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 ba29f06b6d784dc1ae8a2e088537e31e113b280c
Showing with 1 addition and 1 deletion.
  1. +1 −1 node.js/lib/client/client.js
@@ -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');

0 comments on commit ba29f06

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.