From 809e0b8c922362b2a4d59d06b77914e60d09fbcf Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Fri, 27 Apr 2012 10:46:27 -0700 Subject: [PATCH] merged --- lib/response.js | 8 -------- support/app.js | 17 +---------------- support/bench | 11 ----------- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/lib/response.js b/lib/response.js index 72773dab..3799ffd6 100644 --- a/lib/response.js +++ b/lib/response.js @@ -79,11 +79,7 @@ res.send = function(body){ switch (typeof body) { // response status case 'number': -<<<<<<< HEAD this.get('Content-Type') || this.type('txt'); -======= - this.get('Content-Type') || this.type('.txt'); ->>>>>>> feature/send-etag this.statusCode = body; body = http.STATUS_CODES[body]; break; @@ -99,11 +95,7 @@ res.send = function(body){ if (null == body) { body = ''; } else if (Buffer.isBuffer(body)) { -<<<<<<< HEAD this.get('Content-Type') || this.type('bin'); -======= - this.get('Content-Type') || this.type('.bin'); ->>>>>>> feature/send-etag } else { return this.json(body); } diff --git a/support/app.js b/support/app.js index ee4461ea..a8bea23e 100644 --- a/support/app.js +++ b/support/app.js @@ -9,11 +9,8 @@ var app = express() , blog = express() , admin = express(); -<<<<<<< HEAD -blog.use('/admin', admin); -======= // app.use(express.logger('dev')) ->>>>>>> feature/send-etag +blog.use('/admin', admin); app.use('/blog', blog); app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); @@ -25,20 +22,8 @@ app.get('/render', function(req, res){ res.render('hello'); }); -<<<<<<< HEAD admin.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){ diff --git a/support/bench b/support/bench index b8408573..207c1819 100755 --- a/support/bench +++ b/support/bench @@ -20,24 +20,13 @@ bench_conditional() { sleep .5 bench / "Hello World" bench /blog "Mounted Hello World" -<<<<<<< HEAD bench /blog/admin "Mounted 2 Hello World" -======= ->>>>>>> feature/send-etag bench /middleware "Middleware" bench /match "Router" bench /render "Render" bench /json "JSON tiny" -<<<<<<< HEAD bench /json/15 "JSON small" bench /json/50 "JSON medium" bench /json/150 "JSON large" -======= -bench /json/small "JSON small" -bench /json/large "JSON large" -bench_conditional /json/large "JSON large etag" -1355435680 - -# 1.25 mb/s ->>>>>>> feature/send-etag kill -9 $pid \ No newline at end of file