Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Nov 16, 2011
1 parent f151ad7 commit c4bc0fb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions jsgi/media.js
Expand Up @@ -81,26 +81,21 @@ function Deserialize(mediaSelector, nextApp){
var unsupportedError = new Error("Unsupported Media Type");
unsupportedError.status = 415;
throw unsupportedError;
// return {status: 415, headers:{}, body: ["Unsupported Media Type"]};
}
try{
body = requestMedia.media.deserialize(body, requestMedia.parameters, request);
}catch(e){
e.status = 400;
throw e;
// return {status: 400, headers: {}, body: [e.message]};
}
if(typeof body.callNextApp === "function"){
return body.callNextApp(nextApp);
}
}

}
//function dir(){var sys=require('sys');for(var i=0,l=arguments.length;i<l;i++)sys.debug(sys.inspect(arguments[i]));}
//dir('DES?:', body);
return when(body, function(body){
//dir('DES!:', body);
request.body = body
request.body = body;
return nextApp(request);
});
};
Expand Down

0 comments on commit c4bc0fb

Please sign in to comment.