diff --git a/lib/responder.js b/lib/responder.js index 2c6d965..821d985 100644 --- a/lib/responder.js +++ b/lib/responder.js @@ -17,8 +17,13 @@ module.exports = function (options, res, next) { if (options.attribute) { content = result[options.attribute]; } - // Set _Content-Type_ response header with `type` through `mime.lookup()` - res.type(options.ext); + if (options.ext) { + // Set _Content-Type_ response header with `type` through `mime.lookup()` + res.type(options.ext); + } else { + res.type('text/plain'); + } + return res.send(content); }; };