зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1077312 - Clean up Accept headers on @font-face HTTP requests. r=mcmanus
This commit is contained in:
Родитель
f1655f6098
Коммит
dcc3e798ae
|
@ -439,8 +439,15 @@ FontFaceSet::StartLoad(gfxUserFontEntry* aUserFontEntry,
|
|||
#endif
|
||||
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
|
||||
if (httpChannel)
|
||||
if (httpChannel) {
|
||||
httpChannel->SetReferrer(aFontFaceSrc->mReferrer);
|
||||
nsAutoCString accept("application/font-woff;q=0.9,*/*;q=0.8");
|
||||
if (Preferences::GetBool(GFX_PREF_WOFF2_ENABLED)) {
|
||||
accept.Insert(NS_LITERAL_CSTRING("application/font-woff2;q=1.0,"), 0);
|
||||
}
|
||||
httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
|
||||
accept, false);
|
||||
}
|
||||
nsCOMPtr<nsISupportsPriority> priorityChannel(do_QueryInterface(channel));
|
||||
if (priorityChannel) {
|
||||
priorityChannel->AdjustPriority(nsISupportsPriority::PRIORITY_HIGH);
|
||||
|
|
Загрузка…
Ссылка в новой задаче