Skip to content
Myr

res.format() now includes charset. Fixes #1744

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Eduardo Sorribas · committed by Eduardo Sorribas · parent b66c7da · Browse files · 2 files+24 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+24 added−2 removed

  • tests:+18 added−1 removed
  • other:+6 added−1 removed

2 files+24 added−2 removed

modified:lib/response.js+6 added-1 removed
466 unmodified lines
467468 this.vary("Accept");469470 if (key) {471 var type = normalizeType(key).value;472 var charset;473 if (charset = mime.charsets.lookup(type)) {474 type += '; charset=' + charset;475 }471 this.set('Content-Type', normalizeType(key).value);476 this.set('Content-Type', type);477 obj[key](req, this, next);478 } else if (fn) {479 fn();480 } else {
326 unmodified lines
modified:test/res.format.js+18 added-1 removed