summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2015-01-16 07:55:31 -0800
committerTimothy J Fontaine <tjfontaine@gmail.com>2015-01-16 13:42:43 -0800
commit89f3c9037faf19eb32c464b2e02a0a9191156c36 (patch)
treeb11a8c1a7fb8a409a100ebb1d5ec8c769560558c
parentefe1781f3d311d437ec2ae26f475e7bd0cdca4f0 (diff)
downloadnode-89f3c9037faf19eb32c464b2e02a0a9191156c36.tar.gz
http: rename flush to flushHeaders
In order to preserve the potential for a flush method being added to the streams API, rename flush to flushHeaders which is much more clear about the behavior of this method. PR: #9048 PR-URL: https://github.com/joyent/node/pull/9048 Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
-rw-r--r--doc/api/http.markdown2
-rw-r--r--lib/_http_outgoing.js2
-rw-r--r--test/simple/test-http-flush.js4
3 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/http.markdown b/doc/api/http.markdown
index 3d482b441..3ba57a195 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 9fd579c09..d02bdf7f2 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 842cf8729..08dd14772 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.
});