mirror of https://github.com/nodejs/node.git
Revert "Normalize HTTP headers."
This reverts commit f623fd7658
.
But only the changes made in lib/ they were falsely detecting outgoing
headers.
pull/22966/head
parent
9d39e18c6d
commit
1eba0cadc1
|
@ -109,8 +109,11 @@ exports.parseUri.options = {
|
|||
};
|
||||
|
||||
|
||||
var connection_expression = /Connection/i;
|
||||
var transfer_encoding_expression = /Transfer-Encoding/i;
|
||||
var close_expression = /close/i;
|
||||
var chunk_expression = /chunk/i;
|
||||
var content_length_expression = /Content-Length/i;
|
||||
|
||||
|
||||
/* Abstract base class for ServerRequest and ClientResponse. */
|
||||
|
@ -244,15 +247,15 @@ OutgoingMessage.prototype.sendHeaderLines = function (first_line, headers) {
|
|||
|
||||
message_header += field + ": " + value + CRLF;
|
||||
|
||||
if ("connection" === field) {
|
||||
if (connection_expression.exec(field)) {
|
||||
sent_connection_header = true;
|
||||
if (close_expression.exec(value)) this.closeOnFinish = true;
|
||||
|
||||
} else if ("transfer-encoding" === field) {
|
||||
} else if (transfer_encoding_expression.exec(field)) {
|
||||
sent_transfer_encoding_header = true;
|
||||
if (chunk_expression.exec(value)) this.chunked_encoding = true;
|
||||
|
||||
} else if ("content-length" === field) {
|
||||
} else if (content_length_expression.exec(field)) {
|
||||
sent_content_length_header = true;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue