Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit ff92460

Browse files
sleavittroot
authored and
root
committed
Ensure that the parser has actually found a field before setting fieldFound to true.
1 parent 02750ca commit ff92460

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/http.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ var parsers = new FreeList('parsers', 1000, function () {
5353

5454
parser.onHeaderValue = function (b, start, len) {
5555
var slice = b.toString('ascii', start, start+len);
56-
parser.fieldFound = true;
56+
if (parser.field && !parser.fieldFound) {
57+
parser.fieldFound = true;
58+
}
5759
if (parser.value) {
5860
parser.value += slice;
5961
} else {

0 commit comments

Comments
 (0)