diff options
author | Moonchild <mcwerewolf@wolfbeast.com> | 2019-03-12 18:29:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-12 18:29:14 +0100 |
commit | 709bc24e9110eba12f94cfcb8db00a8338ac4098 (patch) | |
tree | 8218d4f60d9eccacbf42df8cb88094a082d401b4 /dom/fetch/FetchDriver.cpp | |
parent | 6b4d81521f0c7bef48a1e8c3e9254a81df27a9d2 (diff) | |
parent | 367d77ee9a6df15cacaf1a1f4032f834e972b335 (diff) | |
download | UXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.tar UXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.tar.gz UXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.tar.lz UXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.tar.xz UXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.zip |
Merge pull request #995 from MoonchildProductions/httpaccept-work
Change the way http Accept: headers are used.
Diffstat (limited to 'dom/fetch/FetchDriver.cpp')
-rw-r--r-- | dom/fetch/FetchDriver.cpp | 10 |
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))) { |