Skip to content

Commit

Permalink
Fix PUT method not including its arguments in signature base
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksiyk committed Nov 15, 2016
1 parent a8f481b commit 2a08f7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -68,7 +68,7 @@ MaxCDN.prototype.get = function get(url, callback) {
};

MaxCDN.prototype.put = function put(url, data, callback) {
this.oauth.put(this._makeUrl(url), '', '', this._makeQuerystring(data), this._parse(callback));
this.oauth.put(this._makeUrl(url), '', '', this._makeObject(data), this._parse(callback));
};

MaxCDN.prototype.post = function post(url, data, callback) {
Expand Down
2 changes: 1 addition & 1 deletion test/index_test.js
Expand Up @@ -91,7 +91,7 @@ test('MaxCDN', function(t) {
t.error(err, 'put w/o error');
t.equal(data.foo, 'bar', 'put w/ data');
t.equal(data.arguments[0], 'https://rws.maxcdn.com/alias/path', 'put w/ path');
t.deepEqual(data.arguments[3], 'data=data', 'put sends data');
t.deepEqual(data.arguments[3], { data: 'data' }, 'put sends data');
});

// post
Expand Down

0 comments on commit 2a08f7b

Please sign in to comment.