From b5425ae2d37d3dd123cbc0430785c0f61082e3e3 Mon Sep 17 00:00:00 2001 From: ayame113 <40050810+ayame113@users.noreply.github.com> Date: Wed, 5 Oct 2022 15:51:59 +0900 Subject: fix(ext/flash): Avoid sending Content-Length when status code is 204 (#15901) Currently Content-Length is sent when the status code is 204. However, according to the spec, this should not be sent. Modify the if statement below to prevent the Content-Length from being sent. --- ext/flash/01_http.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/flash/01_http.js b/ext/flash/01_http.js index 789979ff9..17f99ca98 100644 --- a/ext/flash/01_http.js +++ b/ext/flash/01_http.js @@ -152,7 +152,8 @@ } // MUST NOT send Content-Length or Transfer-Encoding if status code is 1xx or 204. - if (status == 204 && status <= 100) { + if (status === 204 || status < 200) { + str += "\r\n"; return str; } -- cgit v1.2.3