-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Connect 3.0
Jonathan Ong edited this page Dec 2, 2013
·
16 revisions
Expected to be released after node v0.12 is released so we can drop node v0.8 support (support 2 latest versions). Deprecation warnings have been added to give developers time to migrate, specifically when using connect through express to avoid a major version bump. Please feel free to add any alternatives to removed middleware.
Note that if you're currently using connect.bodyParser(),
you will still get the deprecation warning for multipart.
For now, you can ignore it since you should only see the warning message once at start up.
If you want to avoid any warning messages, do this instead (which is what connect.bodyParser() will be in 3.0):
app.use(connect.urlencoded())
app.use(connect.json())
- Remove multipart middleware. By default, multipart downloads files to disk, which is deemed a security issue. Using multipart middleware as a stream (
defer) became overly complex, and maintainers would rather have developers use a multipart parser directly. Since removing thedeferoption and only allowing developers to download multipart files to disk would cause security concerns, we opted to remove the entire multipart middleware instead. Use one of the following parsers or middleware instead: - Remove staticCache. Use one of the following alternatives:
- Remove limit middleware. No longer used by any of the parsers. It doesn't work properly for streams2.
- Remove cookieParser.
Will be replaced with
cookiesinstead using cookies. It will be unnecessary for Express 4.0 users and optional for cookie sessions and sessions. - Remove connect patches.
- Remove
headerevent - just overwrite.writeHeadinstead - Remove
res.headerSent- use node's.headersSentproperty instead - Remove
res.setHeaderpatch - your framework (such as Express) should handle charsets.cookies(the middleware, will be included in Express) will handle set-cookies.
- Remove
- Remove node 0.8 support. Connect 3 will be released after node v0.12 and will only support the latest 2 stable versions of node.
- Remove
pauseutility - Remove any unnecessary patches in https://github.com/senchalabs/connect/blob/master/lib/patch.js
- Remove
- Deprecate basic-auth. It won't be removed, but no bug reports or PRs will be accepted anymore. For any other use case, use node-basic-auth.