From cce4dce5cbe75fbf3b8956b99b90fcfd5e78dec4 Mon Sep 17 00:00:00 2001 From: ofir Date: Fri, 28 Jan 2022 23:13:54 +0200 Subject: [PATCH] lib: fix prefixed headers order Keep prefixed headers order same as sent order Fixes: https://github.com/nodejs/node/issues/38797 --- lib/internal/http2/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js index 78ff2937c3a317..8a995cf003c75b 100644 --- a/lib/internal/http2/util.js +++ b/lib/internal/http2/util.js @@ -520,7 +520,7 @@ function mapToHeaders(map, err = assertValuePseudoHeader(key); if (err !== undefined) throw err; - ret = `${key}\0${value}\0${flags}${ret}`; + ret += `${key}\0${value}\0${flags}`; count++; continue; }