Skip to content
Myr

misc refactoring

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 3588c1e · Browse files · 1 file+4 added−3 removed
This commit

State

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

Diff stats

1 file+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:lib/response.js+4 added-3 removed
15 unmodified lines
16 , utils = connect.utils17 , parseRange = require('./utils').parseRange18 , res = http.ServerResponse.prototype19 , send = connect.static.send20 , join = require('path').join21 , mime = require('mime');20 , mime = require('mime')21 , basename = path.basename22 , join = path.join;2324/**25 * Send a response with the given `body` and optional `headers` and `status` code.26 *
153 unmodified lines
180181res.attachment = function(filename){182 if (filename) this.contentType(filename);183 this.header('Content-Disposition', filename183 ? 'attachment; filename="' + path.basename(filename) + '"'184 ? 'attachment; filename="' + basename(filename) + '"'185 : 'attachment');186 return this;187};188
236 unmodified lines