update connect to 2.16.1
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 · parent d98e2e7 · Browse files · 6 files·+29 added−15 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+29 added−15 removed
- tests:+3 added−3 removed
- other:+26 added−12 removed
Provenance
- Commit
65f13c3- Tree
575e233- Author
Douglas Christopher Wilson <doug@somethingdoug.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent
d98e2e7
6 files changed+29 added−15 removed
modified:lib/router/index.js+7 added-7 removed
1 /**2 * Module dependencies.3 */4 5-var Route = require('./route')6- , utils = require('../utils')7- , methods = require('methods')8- , debug = require('debug')('express:router')9- , parse = require('connect').utils.parseUrl;5+var Route = require('./route');6+var utils = require('../utils');7+var methods = require('methods');8+var debug = require('debug')('express:router');9+var parseUrl = require('parseurl');10 11 /**12 * Expose `Router` constructor.13 */167 unmodified lines181 * @api private182 */183 184 Router.prototype._options = function(req, res, next){185- var path = parse(req).pathname185+ var path = parseUrl(req).pathname186 , body = this._optionsFor(path).join(',');187 if (!body) return next();188 res.set('Allow', body).send(body);189 };31 unmodified lines221 */222 223 Router.prototype.matchRequest = function(req, i, head){224 var method = req.method.toLowerCase()225- , url = parse(req)225+ , url = parseUrl(req)226 , path = url.pathname227 , routes = this.map228 , i = i || 0229 , route;92 unmodified linesmodified:lib/request.js+1 added-1 removed
6 unmodified lines7 , utils = require('./utils')8 , connect = require('connect')9 , fresh = require('fresh')10 , parseRange = require('range-parser')11- , parse = connect.utils.parseUrl11+ , parse = require('parseurl')12 , mime = connect.mime;13 14 /**15 * Request prototype.520 unmodified linesmodified:lib/response.js+3 added-3 removed
332 unmodified lines333 done = true;334 335 // clean up336 cleanup();337- if (!self.headerSent) self.removeHeader('Content-Disposition');337+ if (!self.headersSent) self.removeHeader('Content-Disposition');338 339 // callback available340 if (fn) return fn(err);341 342 // list in limbo if there's no callback343- if (self.headerSent) return;343+ if (self.headersSent) return;344 345 // delegate346 next(err);347 }26 unmodified lines374 *375 * Optionally providing an alternate attachment `filename`,376 * and optional callback `fn(err)`. The callback is invoked377 * when the data transfer is complete, or when an error has378- * ocurred. Be sure to check `res.headerSent` if you plan to respond.378+ * ocurred. Be sure to check `res.headersSent` if you plan to respond.379 *380 * This method uses `res.sendfile()`.381 *382 * @param {String} path440 unmodified linesmodified:test/res.sendfile.js+3 added-3 removed
40 unmodified lines41 42 app.use(function(req, res){43 res.sendfile('test/fixtures/nope.html', function(err){44 ++calls;45- assert(!res.headerSent);45+ assert(!res.headersSent);46 res.send(err.message);47 });48 });49 26 unmodified lines76 , calls = 0;77 78 app.use(function(req, res){79 res.sendfile('test/fixtures/foo/../user.html', function(err){80- assert(!res.headerSent);80+ assert(!res.headersSent);81 ++calls;82 res.send(err.message);83 });84 });9 unmodified lines94 , calls = 0;95 96 app.use(function(req, res){97 res.sendfile('test/fixtures/user.html', function(err){98- assert(!res.headerSent);98+ assert(!res.headersSent);99 req.socket.listeners('error').should.have.length(1); // node's original handler100 done();101 });102 140 unmodified linesmodified:History.md+13 added
1+3.x2+===3+4+ * update connect to 2.16.15+ - deprecate `res.headerSent` -- use `res.headersSent`6+ - deprecate `res.on("header")` -- use on-headers module instead7+ - json: use body-parser8+ - urlencoded: use body-parser9+ - dep: bytes@1.0.010+ - dep: cookie-parser@1.1.011+ - dep: csurf@1.2.012+ - dep: express-session@1.1.013+14 3.6.0 / 2014-05-0915 ==================16 17 * deprecate `app.del()` -- use `app.delete()` instead1312 unmodified linesmodified:package.json+2 added-1 removed
32 unmodified lines333435363737383940414243444541 unmodified lines32 unmodified lines "email": "shtylman+expressjs@gmail.com" } ], "dependencies": { "connect": "2.15.0", "connect": "2.16.1", "commander": "1.3.2", "methods": "1.0.0", "mkdirp": "0.5.0", "parseurl": "1.0.1", "range-parser": "1.0.0", "cookie": "0.1.2", "buffer-crc32": "0.2.1", "fresh": "0.2.2",41 unmodified lines