summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-client-abort.js
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2016-01-06 17:00:27 -0500
committerFedor Indutny <fedor@indutny.com>2016-01-07 03:39:15 -0500
commit5f76b24e5ee440b7c2d2bdc74a9bb94374df9f2a (patch)
treec71a3fa6e69e57b9a50ad51188e7a2e9a19f53c7 /test/parallel/test-http-client-abort.js
parent1ab6b21360d97719b3101153fb164c0c3eddf038 (diff)
downloadandroid-node-v8-5f76b24e5ee440b7c2d2bdc74a9bb94374df9f2a.tar.gz
android-node-v8-5f76b24e5ee440b7c2d2bdc74a9bb94374df9f2a.tar.bz2
android-node-v8-5f76b24e5ee440b7c2d2bdc74a9bb94374df9f2a.zip
http: overridable `clientError`
Make default `clientError` behavior (close socket immediately) overridable. With this APIs it is possible to write a custom error handler, and to send, for example, a 400 HTTP response. http.createServer(...).on('clientError', function(err, socket) { socket.end('HTTP/1.1 400 Bad Request\r\n\r\n'); socket.destroy(); }); Fix: #4543 PR-URL: https://github.com/nodejs/node/pull/4557 Reviewed-By: Brian White <mscdex@mscdex.net>
Diffstat (limited to 'test/parallel/test-http-client-abort.js')
-rw-r--r--test/parallel/test-http-client-abort.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/test/parallel/test-http-client-abort.js b/test/parallel/test-http-client-abort.js
index c3353bb722..28998c7050 100644
--- a/test/parallel/test-http-client-abort.js
+++ b/test/parallel/test-http-client-abort.js
@@ -21,12 +21,6 @@ var server = http.Server(function(req, res) {
server.close();
}
});
-
- // since there is already clientError, maybe that would be appropriate,
- // since "error" is magical
- req.on('clientError', function() {
- console.log('Got clientError');
- });
});
var responses = 0;