summaryrefslogtreecommitdiff
path: root/ext/fetch/26_fetch.js
diff options
context:
space:
mode:
authorMark Ladyshau <47859603+mrkldshv@users.noreply.github.com>2022-06-19 23:33:24 +0200
committerGitHub <noreply@github.com>2022-06-19 23:33:24 +0200
commit60869c2598321386f57e55537e8c99ed011fbb95 (patch)
treea318d137c9b69da940652f0b5926aa32dcf8cb5d /ext/fetch/26_fetch.js
parent9f1f76f0b0fc71fc57a885f37c5bcabfd1de4b82 (diff)
fix(ext/fetch): add `accept-language` default header to fetch (#14882)
Diffstat (limited to 'ext/fetch/26_fetch.js')
-rw-r--r--ext/fetch/26_fetch.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js
index 7ef9bdaf7..9a4916e21 100644
--- a/ext/fetch/26_fetch.js
+++ b/ext/fetch/26_fetch.js
@@ -452,6 +452,10 @@
ArrayPrototypePush(request.headerList, ["Accept", "*/*"]);
}
+ if (!requestObject.headers.has("Accept-Language")) {
+ ArrayPrototypePush(request.headerList, ["Accept-Language", "*"]);
+ }
+
// 12.
opPromise = PromisePrototypeCatch(
PromisePrototypeThen(