From 812a470122cad1fc6904a29307d00e881bb26239 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 23 Feb 2012 10:58:57 -0800 Subject: [PATCH] docs --- lib/response.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/response.js b/lib/response.js index 6939093e53..deceb21b15 100644 --- a/lib/response.js +++ b/lib/response.js @@ -354,6 +354,7 @@ res.format = function(obj){ : mime.lookup(keys[i])); } + // determine most acceptable format out: for (var i = 0, len = accepted.length; i < len; ++i) { for (var j = 0, jlen = types.length; j < jlen; ++j) { @@ -365,6 +366,7 @@ res.format = function(obj){ } } + // default to the first if (!accepted.length) { key = keys[0]; type = types[0];