diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 3d482b441c8..3ba57a19567 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -855,7 +855,7 @@ Emitted when the server sends a '100 Continue' HTTP response, usually because the request contained 'Expect: 100-continue'. This is an instruction that the client should send the request body. -### request.flush() +### request.flushHeaders() Flush the request headers. diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 9fd579c09fd..d02bdf7f23e 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -613,7 +613,7 @@ OutgoingMessage.prototype._flush = function() { }; -OutgoingMessage.prototype.flush = function() { +OutgoingMessage.prototype.flushHeaders = function outgoingFlushHeaders() { if (!this._header) { // Force-flush the headers. this._implicitHeader(); diff --git a/test/simple/test-http-flush.js b/test/simple/test-http-flush.js index 842cf8729e0..08dd1477220 100644 --- a/test/simple/test-http-flush.js +++ b/test/simple/test-http-flush.js @@ -32,6 +32,6 @@ http.createServer(function(req, res) { host: '127.0.0.1', port: common.PORT, }); - req.flush(); // Flush the request headers. - req.flush(); // Should be idempotent. + req.flushHeaders(); // Flush the request headers. + req.flushHeaders(); // Should be idempotent. });