Permalink
Browse files

Revert 8dc8773. Always send a HTTP/1.1 status line to the client.

  • Loading branch information...
1 parent c0d3f1f commit 153938562025fcd4e063123f07ec61fbb20103ef @bnoordhuis committed Jul 5, 2011
Showing with 3 additions and 6 deletions.
  1. +2 −5 lib/http.js
  2. +1 −1 test/simple/test-http-1.0.js
View
@@ -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)) {
@@ -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"

0 comments on commit 1539385

Please sign in to comment.