From 0d586c5336a659f788a6d65b4bf6d979b3cc29ae Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Fri, 17 Jun 2022 18:48:37 +0200 Subject: [PATCH] Fix websocket rejection header mirroring --- src/rules/websockets/websocket-handlers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules/websockets/websocket-handlers.ts b/src/rules/websockets/websocket-handlers.ts index b789a98b5..0dc4ee6cc 100644 --- a/src/rules/websockets/websocket-handlers.ts +++ b/src/rules/websockets/websocket-handlers.ts @@ -167,7 +167,7 @@ const rawResponse = ( headers: RawHeaders = [] ) => `HTTP/1.1 ${statusCode} ${statusMessage}\r\n` + - _.map(headers, (value, key) => + _.map(headers, ([key, value]) => `${key}: ${value}` ).join('\r\n') + '\r\n\r\n';