diff options
author | Noah Slater <nslater@apache.org> | 2009-07-06 00:33:50 +0000 |
---|---|---|
committer | Noah Slater <nslater@apache.org> | 2009-07-06 00:33:50 +0000 |
commit | 282b96ddd9a84b740788c2358ec0f5fedafb7cc6 (patch) | |
tree | fb48e605ceb8079d0195d3b1ec0eca7110fa7ef2 /share/server | |
parent | b5cc085d3bc6316063f14adedf20632ee904875d (diff) |
trimmed trailing whitespace
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791350 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/server')
-rw-r--r-- | share/server/render.js | 18 | ||||
-rw-r--r-- | share/server/util.js | 2 | ||||
-rw-r--r-- | share/server/views.js | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/share/server/render.js b/share/server/render.js index b3a24bde..304d0fc7 100644 --- a/share/server/render.js +++ b/share/server/render.js @@ -121,7 +121,7 @@ respondWith = function(req, responders) { var provides = []; for (key in responders) { if (mimesByKey[key]) { - provides = provides.concat(mimesByKey[key]); + provides = provides.concat(mimesByKey[key]); } } var bestMime = Mimeparse.bestMatch(provides, accept); @@ -130,7 +130,7 @@ respondWith = function(req, responders) { bestKey = req.query.format; } var rFunc = responders[bestKey || responders.fallback || "html"]; - if (rFunc) { + if (rFunc) { if (isShow) { var resp = maybeWrapResponse(rFunc()); resp["headers"] = resp["headers"] || {}; @@ -141,7 +141,7 @@ respondWith = function(req, responders) { respTail = rFunc(); } } else { - throw({code:406, body:"Not Acceptable: "+accept}); + throw({code:406, body:"Not Acceptable: "+accept}); } }; @@ -198,7 +198,7 @@ function sendStart(label) { startResp = startResp || {}; startResp["headers"] = startResp["headers"] || {}; startResp["headers"]["Content-Type"] = startResp["headers"]["Content-Type"] || respCT; - + respond(["start", chunks, startResp]); chunks = []; startResp = {}; @@ -221,7 +221,7 @@ function getRow() { gotRow = true; sendStart(); } else { - blowChunks() + blowChunks() } var line = readline(); var json = eval(line); @@ -247,7 +247,7 @@ function getRow() { var isShow = false; var Render = (function() { var row_info; - + return { show : function(funSrc, doc, req) { isShow = true; @@ -295,11 +295,11 @@ function runListRenderFunction(renderFun, args, funSrc, htmlErrors) { getRow(); } if (typeof resp != "undefined") { - chunks.push(resp); + chunks.push(resp); } else if (respTail) { - chunks.push(respTail); + chunks.push(respTail); } - blowChunks("end"); + blowChunks("end"); } catch(e) { respondError(e, funSrc, htmlErrors); } diff --git a/share/server/util.js b/share/server/util.js index 13b8a779..28c02fbc 100644 --- a/share/server/util.js +++ b/share/server/util.js @@ -94,7 +94,7 @@ function recursivelySeal(obj) { // prints the object as JSON, and rescues and logs any toJSON() related errors function respond(obj) { try { - print(toJSON(obj)); + print(toJSON(obj)); } catch(e) { log("Error converting object to JSON: " + e.toString()); } diff --git a/share/server/views.js b/share/server/views.js index 5e193cbc..9e421237 100644 --- a/share/server/views.js +++ b/share/server/views.js @@ -27,7 +27,7 @@ sum = function(values) { } var Views = (function() { - + function runReduce(reduceFuns, keys, values, rereduce) { for (var i in reduceFuns) { reduceFuns[i] = compileFunction(reduceFuns[i]); @@ -51,7 +51,7 @@ var Views = (function() { if (query_config && query_config.reduce_limit && reduce_length > 200 && ((reduce_length * 2) > line.length)) { var reduce_preview = "Current output: '"+(reduce_line.substring(0,100) + "'... (first 100 of "+reduce_length+' bytes)'); - + throw { error:"reduce_overflow_error", reason: "Reduce output must shrink more rapidly: "+reduce_preview+"" @@ -60,7 +60,7 @@ var Views = (function() { print("[true," + reduce_line + "]"); } }; - + return { reduce : function(reduceFuns, kvs) { var keys = new Array(kvs.length); |