Skip to content
Myr

Merge tag '3.10.3'

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 · parents 980a15d, 2fd31f6 · Browse files · 3 files+39 added−53 removed
This commit

State

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

Diff stats

3 files+39 added−53 removed

  • other:+39 added−53 removed

3 files+39 added−53 removed

modified:lib/response.js+4 added-22 removed
16 unmodified lines
17var send = require('send');18var basename = path.basename;19var extname = path.extname;20var mime = send.mime;21var vary = require('vary');2223/**24 * Response prototype.25 */
709 unmodified lines
735 * @api public736 */737738res.vary = function(field){738 var self = this;739740 // nothing739 // checks for back-compat740 if (!field) return this;741 if (Array.isArray(field) && !field.length) return this;742743 // array744 if (Array.isArray(field)) {745 field.forEach(function(field){746 self.vary(field);747 });748 return;749 }743 vary(this, field);744751 var vary = this.get('Vary');752753 // append754 if (vary) {755 vary = vary.split(/ *, */);756 if (!~vary.indexOf(field)) vary.push(field);757 this.set('Vary', vary.join(', '));758 return this;759 }760761 // set762 this.set('Vary', field);745 return this;746};747748/**
35 unmodified lines
modified:History.md+25 added
1unreleased2==========34 * use `vary` module for `res.vary`5 * deps: proxy-addr@1.0.16 * deps: type-is@1.2.17 * deps: debug@1.0.0894.4.1 / 2014-06-0210==================11
150 unmodified lines
162 - `app.router()` - returns the app Router instance163 - `app.route()` - Proxy to the app's `Router#route()` method to create a new route164 - Router & Route - public API1651663.10.3 / 2014-06-05167===================168169 * use `vary` module for `res.vary`170 * deps: connect@2.19.4171 - deps: errorhandler@1.0.2172 - deps: method-override@2.0.2173 - deps: serve-favicon@2.0.1174 * deps: debug@1.0.01751763.10.2 / 2014-06-03177===================178179 * deps: connect@2.19.3180 - deps: compression@1.0.61811823.10.1 / 2014-06-03183===================184185 * deps: connect@2.19.2186 - deps: compression@1.0.4187 * deps: proxy-addr@1.0.11881893.10.0 / 2014-06-02190===================191192 * deps: connect@2.19.1
1388 unmodified lines
modified:package.json+10 added-31 removed