Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Feb 23, 2012
1 parent eb3105e commit 812a470
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -365,6 +366,7 @@ res.format = function(obj){
}
}

// default to the first
if (!accepted.length) {
key = keys[0];
type = types[0];
Expand Down

0 comments on commit 812a470

Please sign in to comment.