diff options
author | Robert Nagy <ronagy@icloud.com> | 2019-05-30 20:24:12 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-13 19:04:44 -0700 |
commit | 5f80df882057522c38c30b99f4bf25d82c68f662 (patch) | |
tree | 608f8e77510cb4b029f02cfc2ff735688f1fe3d2 /test/parallel/test-http-response-status-message.js | |
parent | 4ca61f40fed31d590e4d624551044fe7cc7efd42 (diff) | |
download | android-node-v8-5f80df882057522c38c30b99f4bf25d82c68f662.tar.gz android-node-v8-5f80df882057522c38c30b99f4bf25d82c68f662.tar.bz2 android-node-v8-5f80df882057522c38c30b99f4bf25d82c68f662.zip |
http: do not emit end after aborted
IncomingMessage will no longer emit end after aborted.
PR-URL: https://github.com/nodejs/node/pull/27984
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-http-response-status-message.js')
-rw-r--r-- | test/parallel/test-http-response-status-message.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-http-response-status-message.js b/test/parallel/test-http-response-status-message.js index 0f9bce8fa8..c4256d9e5a 100644 --- a/test/parallel/test-http-response-status-message.js +++ b/test/parallel/test-http-response-status-message.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); const net = require('net'); @@ -71,6 +71,7 @@ function runTest(testCaseIndex) { console.log(`client: actual status message: ${response.statusMessage}`); assert.strictEqual(testCase.statusMessage, response.statusMessage); + response.on('aborted', common.mustNotCall()); response.on('end', function() { countdown.dec(); if (testCaseIndex + 1 < testCases.length) { |