4.11.0
expressjs/express4.11.0Jan 14, 2015by dougwilson
AI Summary
Express 4.11.0 introduces the new `res.append()` method for appending headers, adds several deprecations for older APIs (`req.param()`, `app.param()` with leading `:`, and `app.param(fn)`), and includes important bug fixes for OPTIONS responses, route matching to prevent stack overflows, and improved `res.sendFile` connection detection.
Key Highlights
- New `res.append(field, val)` method to append headers to responses
- Deprecation of `req.param()` in favor of `req.params`, `req.body`, or `req.query`
- Deprecation of leading `:` in `app.param(name, fn)` and `app.param(fn)`
- Fixed `OPTIONS` responses to properly include the `HEAD` method
- Improved route matching to prevent stack overflows with iterative matching
New Features
- Added `res.append(field, val)` method to append HTTP headers to responses
- Fixed `OPTIONS` responses to include the `HEAD` method properly
- Fixed `res.sendFile` not always detecting aborted connections
- Implemented iterative route matching to prevent stack overflows
Full Release Notes
- Add `res.append(field, val)` to append headers - Deprecate leading `:` in `name` for `app.param(name, fn)` - Deprecate `req.param()` -- use `req.params`, `req.body`, or `req.query` instead - Deprecate `app.param(fn)` - Fix `OPTIONS` responses to include the `HEAD` method properly - Fix `res.sendFile` not always detecting aborted connection - Match routes iteratively to prevent stack overflows - deps: accepts@~1.2.2 - deps: mime-types@~2.0.7 - deps: negotiator@0.5.0 - deps: send@0.11.0 - deps: debug@~2.1.1 - deps: etag@~1.5.1 - deps: ms@0.7.0 - deps: on-finished@~2.2.0 - deps: serve-static@~1.8.0 - deps: send@0.11.0