From 86581245a95177f3ca00e93f1e51976a24c88485 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 23 Apr 2014 07:42:43 -0400 Subject: [PATCH] fix(main) sendResponse: query always undefined --- cloudcmd.js | 1 + lib/server/main.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cloudcmd.js b/cloudcmd.js index 40e7d59f..6d94b3fc 100644 --- a/cloudcmd.js +++ b/cloudcmd.js @@ -244,6 +244,7 @@ main.sendFile(p); } else if (isJSON) { p.name +='.json'; + p.query = query; json = Util.stringifyJSON(data); main.sendResponse(p, json, NOT_LOG); } else diff --git a/lib/server/main.js b/lib/server/main.js index 79979f1f..a7aa95be 100644 --- a/lib/server/main.js +++ b/lib/server/main.js @@ -334,7 +334,7 @@ * @param pName - имя отсылаемого файла */ function sendResponse(params, data, notLog) { - var p, query, isGzip, head, + var p, isGzip, head, ret = checkParams(params); if (ret) { @@ -346,7 +346,7 @@ name : p.name, cache : p.cache, gzip : isGzip, - query : query + query : p.query }); setHeader(head, p.response);