diff options
Diffstat (limited to 'test/parallel/test-http-response-no-headers.js')
-rw-r--r-- | test/parallel/test-http-response-no-headers.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/parallel/test-http-response-no-headers.js b/test/parallel/test-http-response-no-headers.js index 4c261fc2ad..3f44b4ef5f 100644 --- a/test/parallel/test-http-response-no-headers.js +++ b/test/parallel/test-http-response-no-headers.js @@ -4,28 +4,28 @@ const assert = require('assert'); const http = require('http'); const net = require('net'); -var expected = { +const expected = { '0.9': 'I AM THE WALRUS', '1.0': 'I AM THE WALRUS', '1.1': '' }; function test(httpVersion, callback) { - var server = net.createServer(function(conn) { - var reply = 'HTTP/' + httpVersion + ' 200 OK\r\n\r\n' + - expected[httpVersion]; + const server = net.createServer(function(conn) { + const reply = 'HTTP/' + httpVersion + ' 200 OK\r\n\r\n' + + expected[httpVersion]; conn.end(reply); }); server.listen(0, '127.0.0.1', common.mustCall(function() { - var options = { + const options = { host: '127.0.0.1', port: this.address().port }; - var req = http.get(options, common.mustCall(function(res) { - var body = ''; + const req = http.get(options, common.mustCall(function(res) { + let body = ''; res.on('data', function(data) { body += data; |