Skip to content
Myr

Merge branch 'master' of github.com:visionmedia/express

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 · parents d5e5647, a861ea7 · Browse files · 2 files+11 added−4 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+11 added−4 removed

  • other:+11 added−4 removed

2 files+11 added−4 removed

modified:bin/express+3 added-2 removed
193 unmodified lines
194 , ' */'195 , ''196 , 'var express = require(\'express\')'197 , ' , routes = require(\'./routes\')'198 , ' , http = require(\'http\');'198 , ' , http = require(\'http\')'199 , ' , path = require(\'path\');'200 , ''201 , 'var app = express();'202 , ''203 , 'app.configure(function(){'
4 unmodified lines
208 , ' app.use(express.logger(\'dev\'));'209 , ' app.use(express.bodyParser());'210 , ' app.use(express.methodOverride());{sess}'211 , ' app.use(app.router);{css}'211 , ' app.use(express.static(__dirname + \'/public\'));'212 , ' app.use(express.static(path.join(__dirname, \'public\')));'213 , '});'214 , ''215 , 'app.configure(\'development\', function(){'216 , ' app.use(express.errorHandler());'
188 unmodified lines
modified:lib/response.js+8 added-2 removed
188 unmodified lines
189 if (done) return;190 done = true;191192 // clean up193 req.socket.removeListener('error', error);193 cleanup();194 if (!self.headerSent) self.removeHeader('Content-Disposition');195196 // callback available197 if (fn) return fn(err);
7 unmodified lines
205206 // streaming207 function stream() {208 if (done) return;209 req.socket.removeListener('error', error);209 cleanup();210 if (fn) self.on('finish', fn);211 }212213 // cleanup214 function cleanup() {215 req.socket.removeListener('error', error);216 }217218 // transfer219 var file = send(req, path);220 if (options.root) file.root(options.root);221 file.maxage(options.maxAge || 0);222 file.on('error', error);223 file.on('directory', next);224 file.on('stream', stream);225 file.pipe(this);226 this.on('finish', cleanup);227};228229/**230 * Transfer the file at the given `path` as an attachment.
373 unmodified lines