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);