mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 22:28:51 +02:00
parent
092fc42fbf
commit
8dc87731c7
1 changed files with 5 additions and 2 deletions
|
@ -771,6 +771,8 @@ function ServerResponse(req) {
|
||||||
this.useChunkedEncodingByDefault = false;
|
this.useChunkedEncodingByDefault = false;
|
||||||
this.shouldKeepAlive = false;
|
this.shouldKeepAlive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._httpVersion = req.httpVersion;
|
||||||
}
|
}
|
||||||
util.inherits(ServerResponse, OutgoingMessage);
|
util.inherits(ServerResponse, OutgoingMessage);
|
||||||
|
|
||||||
|
@ -831,8 +833,9 @@ ServerResponse.prototype.writeHead = function(statusCode) {
|
||||||
headers = obj;
|
headers = obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
var statusLine = 'HTTP/1.1 ' + statusCode.toString() + ' ' +
|
var statusLine = 'HTTP/' + this._httpVersion
|
||||||
reasonPhrase + CRLF;
|
+ ' ' + statusCode.toString()
|
||||||
|
+ ' ' + reasonPhrase + CRLF;
|
||||||
|
|
||||||
if (statusCode === 204 || statusCode === 304 ||
|
if (statusCode === 204 || statusCode === 304 ||
|
||||||
(100 <= statusCode && statusCode <= 199)) {
|
(100 <= statusCode && statusCode <= 199)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue