From 7623a63c43191536117b35e2a478b0c56dc2f503 Mon Sep 17 00:00:00 2001 From: Eliot Alter Date: Tue, 5 Jun 2012 17:29:47 -1000 Subject: [PATCH] Allowed string responses to return a string instead of json --- lib/journey.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/journey.js b/lib/journey.js index f41c9fa..dcfa0e7 100644 --- a/lib/journey.js +++ b/lib/journey.js @@ -376,7 +376,9 @@ journey.Router.prototype = { case "object": return mixin({}, baseResponse, { body: response }); case "string": - return mixin({}, baseResponse, { body: { journey: response } }); + var base = {headers: {"Content-Type": "text/html"}, + status: baseResponse.status}; + return mixin({}, base, { body: response }); case "number": return mixin({}, baseResponse, { status: response }); case "array":