Skip to content

Commit

Permalink
Merge pull request #564 from alfonsoc/master
Browse files Browse the repository at this point in the history
Using req.accepts() according to implementation. Fixes https://github.co...
  • Loading branch information
gergelyke committed Apr 17, 2014
2 parents c0428ad + 492e7af commit 27bf969
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/response.js
Expand Up @@ -53,11 +53,8 @@ Response.prototype.format = function format(body, cb) {
var self = this;

if (!type) {
for (var i = 0; i < this.acceptable.length; i++) {
if (this.req.accepts(this.acceptable[i])) {
type = this.acceptable[i];
break;
}
if (this.req.accepts(this.acceptable)) {
type = this.req.accepts(this.acceptable);
}

if (!type) {
Expand Down

0 comments on commit 27bf969

Please sign in to comment.