From 93d31c4c03008272bc2795a5ce024615c25487d4 Mon Sep 17 00:00:00 2001 From: Bryan English Date: Wed, 20 Apr 2016 10:44:01 -0700 Subject: [PATCH] http: correct error message for invalid trailer Prevent misleading error messages when trailers are invalid. --- lib/_http_outgoing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 77bfe4ba77d416..e1e78e010cfd62 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -519,7 +519,7 @@ OutgoingMessage.prototype.addTrailers = function(headers) { 'Trailer name must be a valid HTTP Token ["' + field + '"]'); } if (common._checkInvalidHeaderChar(value) === true) { - throw new TypeError('The header content contains invalid characters'); + throw new TypeError('The trailer content contains invalid characters'); } this._trailer += field + ': ' + escapeHeaderValue(value) + CRLF; }