mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 13:58:40 +09:00
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.
This commit is contained in:
parent
c8412ad501
commit
9bcb7ab2a5
3 changed files with 0 additions and 18 deletions
|
|
@ -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))) {
|
||||
|
|
|
|||
|
|
@ -462,10 +462,6 @@ txCompileObserver::startLoad(nsIURI* aUri, txStylesheetCompiler* aCompiler,
|
|||
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
|
||||
if (httpChannel) {
|
||||
httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
|
||||
NS_LITERAL_CSTRING("*/*"),
|
||||
false);
|
||||
|
||||
nsCOMPtr<nsIURI> referrerURI;
|
||||
aReferrerPrincipal->GetURI(getter_AddRefs(referrerURI));
|
||||
if (referrerURI) {
|
||||
|
|
|
|||
|
|
@ -1677,10 +1677,6 @@ Loader::LoadSheet(SheetLoadData* aLoadData,
|
|||
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
|
||||
if (httpChannel) {
|
||||
// Send a minimal Accept header for text/css
|
||||
httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
|
||||
NS_LITERAL_CSTRING("text/css,*/*;q=0.1"),
|
||||
false);
|
||||
nsCOMPtr<nsIURI> referrerURI = aLoadData->GetReferrerURI();
|
||||
if (referrerURI)
|
||||
httpChannel->SetReferrerWithPolicy(referrerURI,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue