diff --git a/test/simple/test-http-response-no-headers.js b/test/simple/test-http-response-no-headers.js index aa5c37b789..95bd01aed5 100644 --- a/test/simple/test-http-response-no-headers.js +++ b/test/simple/test-http-response-no-headers.js @@ -24,7 +24,11 @@ var assert = require('assert'); var http = require('http'); var net = require('net'); -var expected = 'I AM THE WALRUS'; +var expected = { + '0.9': 'I AM THE WALRUS', + '1.0': 'I AM THE WALRUS', + '1.1': '', +} var gotExpected = false; @@ -34,7 +38,7 @@ function test(httpVersion, callback) { }); var server = net.createServer(function(conn) { - var reply = 'HTTP/' + httpVersion + ' 200 OK\r\n\r\n' + expected; + var reply = 'HTTP/' + httpVersion + ' 200 OK\r\n\r\n' + expected[httpVersion]; conn.write(reply, function() { conn.destroy(); @@ -55,7 +59,7 @@ function test(httpVersion, callback) { }); res.on('end', function() { - assert.equal(body, expected); + assert.equal(body, expected[httpVersion]); gotExpected = true; server.close(); if (callback) process.nextTick(callback);