diff --git a/lib/multipartform.js b/lib/multipartform.js index 7196724..698ddc1 100644 --- a/lib/multipartform.js +++ b/lib/multipartform.js @@ -109,7 +109,7 @@ Part.prototype = { //Now write out the body of the Part if (this.value instanceof File) { - fs.open(this.value.path, "r", 0666, function (err, fd) { + fs.open(this.value.path, "r", "0666", function (err, fd) { if (err) throw err; var position = 0; diff --git a/test/restler.js b/test/restler.js index 819a6e2..b6ef865 100644 --- a/test/restler.js +++ b/test/restler.js @@ -110,7 +110,7 @@ module.exports['Basic'] = { }); }, - 'Should GET withouth path': function(test) { + 'Should GET without path': function(test) { rest.get(host).on('complete', function(data) { test.re(data, /^GET \//, 'should hit /'); test.done();