summaryrefslogtreecommitdiffstats
path: root/dom/fetch
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-03-07 13:05:13 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-07 13:05:13 +0100
commitb00b0763776f9ae47b1843d025ecb50c4b997bca (patch)
tree936ab7615a5ea32f71bb3bab2d8269a28257f689 /dom/fetch
parentd38ddd92e159113aae22c4dc8f03dc2285e01b14 (diff)
downloadUXP-b00b0763776f9ae47b1843d025ecb50c4b997bca.tar
UXP-b00b0763776f9ae47b1843d025ecb50c4b997bca.tar.gz
UXP-b00b0763776f9ae47b1843d025ecb50c4b997bca.tar.lz
UXP-b00b0763776f9ae47b1843d025ecb50c4b997bca.tar.xz
UXP-b00b0763776f9ae47b1843d025ecb50c4b997bca.zip
Remove various hard-coded Accept: headers
Since we're now handling this in the network back-end, there's no need for this anymore. Tag #993.
Diffstat (limited to 'dom/fetch')
-rw-r--r--dom/fetch/FetchDriver.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp
index 1791399b7..6294b0dc5 100644
--- a/dom/fetch/FetchDriver.cpp
+++ b/dom/fetch/FetchDriver.cpp
@@ -903,11 +903,7 @@ FetchDriver::SetRequestHeaders(nsIHttpChannel* aChannel) const
AutoTArray<InternalHeaders::Entry, 5> headers;
mRequest->Headers()->GetEntries(headers);
- bool hasAccept = false;
for (uint32_t i = 0; i < headers.Length(); ++i) {
- if (!hasAccept && headers[i].mName.EqualsLiteral("accept")) {
- hasAccept = true;
- }
if (headers[i].mValue.IsEmpty()) {
aChannel->SetEmptyRequestHeader(headers[i].mName);
} else {
@@ -915,12 +911,6 @@ FetchDriver::SetRequestHeaders(nsIHttpChannel* aChannel) const
}
}
- if (!hasAccept) {
- aChannel->SetRequestHeader(NS_LITERAL_CSTRING("accept"),
- NS_LITERAL_CSTRING("*/*"),
- false /* merge */);
- }
-
if (mRequest->ForceOriginHeader()) {
nsAutoString origin;
if (NS_SUCCEEDED(nsContentUtils::GetUTFOrigin(mPrincipal, origin))) {