Skip to content
Myr

add deprecation message to res.vary()

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

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent ba8a4c5 · Browse files · 2 files+5 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+5 added−2 removed

  • other:+5 added−2 removed

2 files+5 added−2 removed

modified:lib/response.js+4 added-2 removed
728 unmodified lines
729 */730731res.vary = function(field){732 // checks for back-compat733 if (!field) return this;734 if (Array.isArray(field) && !field.length) return this;733 if (!field || (Array.isArray(field) && !field.length)) {734 deprecate('res.vary(): Provide a field name');735 return this;736 }737738 vary(this, field);739740 return this;
38 unmodified lines
modified:History.md+1 added
1 unmodified line
2==========34 * add deprecation message to non-plural `req.accepts*`5 * add deprecation message to `res.send(body, status)`6 * add deprecation message to `res.vary()`7 * deprecate things with `depd` module8 * fix behavior when handling request without routes9 * fix handling when `route.all` is only route10 * restore `req.params` after invoking router
1683 unmodified lines