From 4c0e01349cae0d7d5254b971afdbb0d5ad9ecaae Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Wed, 7 Oct 2015 11:41:57 -0700 Subject: [PATCH] accredit: add failback if contenttype isn't set --- accredit/cloud-code/cloud/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/accredit/cloud-code/cloud/app.js b/accredit/cloud-code/cloud/app.js index 126e58aa..f980d60f 100644 --- a/accredit/cloud-code/cloud/app.js +++ b/accredit/cloud-code/cloud/app.js @@ -231,7 +231,9 @@ app.post ('/getCredentials', function (req, res) { var credentialsObject = credentialsRequest.get ('credentials'); responseString = credentialsObject.get ('responseString'); responseContentType = credentialsObject.get ('responseContentType'); - + if (!responseContentType) { + responseContentType = "text/plain"; + } return destroyRequestAndResponse (credentialsRequest, credentialsResponse); }).then (function () { res.type (responseContentType);