From: Ben Noordhuis Date: Tue, 5 Jul 2011 19:54:06 +0000 (+0200) Subject: Revert 8dc8773. Always send a HTTP/1.1 status line to the client. X-Git-Tag: v0.5.1~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e8667d829b22456948737c8b87862f59023606b;p=platform%2Fupstream%2Fnodejs.git Revert 8dc8773. Always send a HTTP/1.1 status line to the client. --- diff --git a/lib/http.js b/lib/http.js index 3b5c15f..af36d5f 100644 --- a/lib/http.js +++ b/lib/http.js @@ -771,8 +771,6 @@ function ServerResponse(req) { this.useChunkedEncodingByDefault = false; this.shouldKeepAlive = false; } - - this._httpVersion = req.httpVersion; } util.inherits(ServerResponse, OutgoingMessage); @@ -833,9 +831,8 @@ ServerResponse.prototype.writeHead = function(statusCode) { headers = obj; } - var statusLine = 'HTTP/' + this._httpVersion - + ' ' + statusCode.toString() - + ' ' + reasonPhrase + CRLF; + var statusLine = 'HTTP/1.1 ' + statusCode.toString() + ' ' + + reasonPhrase + CRLF; if (statusCode === 204 || statusCode === 304 || (100 <= statusCode && statusCode <= 199)) { diff --git a/test/simple/test-http-1.0.js b/test/simple/test-http-1.0.js index 3e06d01..58a6921 100644 --- a/test/simple/test-http-1.0.js +++ b/test/simple/test-http-1.0.js @@ -119,7 +119,7 @@ function test(handler, request_generator, response_validator) { } function response_validator(server_response, client_got_eof, timed_out) { - var expected_response = ("HTTP/1.0 200 OK\r\n" + var expected_response = ("HTTP/1.1 200 OK\r\n" + "Content-Type: text/plain\r\n" + "Connection: close\r\n" + "\r\n"