From cf6fcfe8bd1366c280d0f449b35bbcfccd62b44c Mon Sep 17 00:00:00 2001 From: Ben Kallus Date: Tue, 17 Oct 2023 17:09:36 -0400 Subject: [PATCH] Verify that HTTP header fields are not empty. --- src/llhttp/http.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/llhttp/http.ts b/src/llhttp/http.ts index d0bfd480..ac16453a 100644 --- a/src/llhttp/http.ts +++ b/src/llhttp/http.ts @@ -542,6 +542,7 @@ export class HTTP { }).otherwise(this.headersCompleted()), }, onInvalidHeaderFieldChar), ) + .peek(':', p.error(ERROR.INVALID_HEADER_TOKEN, 'Empty header field')) .otherwise(span.headerField.start(n('header_field'))); n('header_field')