File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1528,7 +1528,7 @@ function parseHeader(stream, callback) {
15281528 let chunk;
15291529 while (null !== (chunk = stream .read ())) {
15301530 const str = decoder .write (chunk);
1531- if (str .match ( / \n\n / )) {
1531+ if (str .includes ( ' \n\n ' )) {
15321532 // Found the header boundary.
15331533 const split = str .split (/ \n\n / );
15341534 header += split .shift ();
@@ -1541,10 +1541,10 @@ function parseHeader(stream, callback) {
15411541 stream .unshift (buf);
15421542 // Now the body of the message can be read from the stream.
15431543 callback (null , header, stream);
1544- } else {
1545- // Still reading the header.
1546- header += str;
1544+ return ;
15471545 }
1546+ // Still reading the header.
1547+ header += str;
15481548 }
15491549 }
15501550}
You can’t perform that action at this time.
0 commit comments