summaryrefslogtreecommitdiff
path: root/ext/flash/01_http.js
diff options
context:
space:
mode:
authorayame113 <40050810+ayame113@users.noreply.github.com>2022-10-05 15:51:59 +0900
committerGitHub <noreply@github.com>2022-10-05 12:21:59 +0530
commitb5425ae2d37d3dd123cbc0430785c0f61082e3e3 (patch)
tree8f972ed187b82873587409b42fc06fe718b81b93 /ext/flash/01_http.js
parentb312503f8f9d7b289b28c2235bdaba1259fc3c37 (diff)
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.
Diffstat (limited to 'ext/flash/01_http.js')
-rw-r--r--ext/flash/01_http.js3
1 files changed, 2 insertions, 1 deletions
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;
}