Skip to content

Commit 2188ad8

Browse files
committed
Fixing bug in content type checking.
1 parent 09630c0 commit 2188ad8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "argo-resource",
3-
"version": "0.0.10",
3+
"version": "0.0.11",
44
"description": "A resource API framework for Argo.",
55
"main": "resource.js",
66
"directories": {

resource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ ResourceInstaller.prototype._setupRequest = function(obj, handler, produces, con
294294
if (methods.indexOf(context.env.request.method) !== -1) {
295295
if (context.env.request.headers['content-type'] && context.consumes
296296
&& context.consumes.indexOf(context.env.request.headers['content-type']) == -1
297-
&& !checkWithParameters) {
297+
&& !checkWithParameters()) {
298298
context.env.response.statusCode = 415;
299299
context.env.resource.error = { message: 'Unsupported Media Type', supported: context.consumes };
300300

0 commit comments

Comments
 (0)