merged
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 a58e3de · Browse files · 3 files·+1 added−35 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+1 added−35 removed
- other:+1 added−35 removed
Provenance
- Commit
809e0b8- Tree
76e6548- Author
TJ Holowaychuk <tj@vision-media.ca>- Committer
TJ Holowaychuk <tj@vision-media.ca>- Parent
a58e3de
3 files changed+1 added−35 removed
modified:lib/response.js-8 removed
77 unmodified lines78 79 switch (typeof body) {80 // response status81 case 'number':82-<<<<<<< HEAD82 this.get('Content-Type') || this.type('txt');84-=======85- this.get('Content-Type') || this.type('.txt');86->>>>>>> feature/send-etag83 this.statusCode = body;84 body = http.STATUS_CODES[body];85 break;86 // string defaulting to html7 unmodified lines94 case 'object':95 if (null == body) {96 body = '';97 } else if (Buffer.isBuffer(body)) {102-<<<<<<< HEAD98 this.get('Content-Type') || this.type('bin');104-=======105- this.get('Content-Type') || this.type('.bin');106->>>>>>> feature/send-etag99 } else {100 return this.json(body);101 }102 break;548 unmodified linesmodified:support/app.js+1 added-16 removed
7 unmodified lines891011121314121613141516173 unmodified lines21222324282526313233272836373839404142432930313236 unmodified lines7 unmodified linesvar app = express() , blog = express() , admin = express();
<<<<<<< HEADblog.use('/admin', admin);=======// app.use(express.logger('dev'))>>>>>>> feature/send-etagblog.use('/admin', admin);app.use('/blog', blog);app.set('views', __dirname + '/views');app.set('view engine', 'jade');app.locals.self = true;3 unmodified linesapp.get('/render', function(req, res){ res.render('hello');});
<<<<<<< HEADadmin.get('/', function(req, res){ res.send('Hello World\n');=======app.get('/json/small', function(req, res){ res.send(repo);});
app.get('/json/large', function(req, res){ var repos = []; var n = 10; while (n--) repos.push(repo); res.send(repos);>>>>>>> feature/send-etag});
blog.get('/', function(req, res){ res.send('Hello World\n');});
36 unmodified linesmodified:support/bench-11 removed
18 unmodified lines19 20 sleep .521 bench / "Hello World"22 bench /blog "Mounted Hello World"23-<<<<<<< HEAD23 bench /blog/admin "Mounted 2 Hello World"25-=======26->>>>>>> feature/send-etag24 bench /middleware "Middleware"25 bench /match "Router"26 bench /render "Render"27 bench /json "JSON tiny"31-<<<<<<< HEAD28 bench /json/15 "JSON small"29 bench /json/50 "JSON medium"30 bench /json/150 "JSON large"35-=======36-bench /json/small "JSON small"37-bench /json/large "JSON large"38-bench_conditional /json/large "JSON large etag" -135543568031 40-# 1.25 mb/s41->>>>>>> feature/send-etag42-32 kill -9 $pid