http: add flushHeaders and deprecate flush#1156
http: add flushHeaders and deprecate flush#1156yosuke-furukawa wants to merge 1 commit intonodejs:v1.xfrom yosuke-furukawa:fix/add_alias_http_flush_headers
Conversation
There was a problem hiding this comment.
Tiny nit: blank line at EOF.
|
LGTM and seems like a reasonable change. @iojs/collaborators Opinions? |
|
LGTM. This actually seems more comprehensive than the original commit in joyent/node. |
|
@dougwilson I know I've seen flush around express before, how annoying is a deprecation like this? |
|
This change is probably better for Express, because we don't use this method directly (yet), but also our compression middleware actually adds a res.flush() method for users to flush the zlib buffer to the client. With this change, it means io.js users of compression can more easily access this feature, since we won't be stomping on the method any longer :) |
|
LGTM |
|
Wouldn't this be semver-major? |
|
Deprecations are only semver minor. See rule
Just making something as deprecated is not backwards-incompatible, as all code using a deprecation function works exactly the same. |
|
Ah, didn't see that |
|
LGTM |
PR-URL: #1156 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Christian Tellnes <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
|
Thanks Yosuke, landed in b2e00e3. |
I found a different API from Node.js v0.12 and io.js.
the detail is here nodejs/node-v0.x-archive@89f3c90
httpmodule in io.js has a methodreq.flush.Node.js v0.12 also has a same behavior method but the different name
req.flushHeaders.the difference may cause to block migrations from Node.js v0.12 to io.js.
But if we rename
req.flushtoreq.flushHeadersnow, we should update the major version.So I add
req.flushHeadersmethod and deprecatereq.flush.If we bump the io.js master version, we would be better to rethink
req.flushis removed.