mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1077312 - Clean up Accept headers on @font-face HTTP requests. r=mcmanus
This commit is contained in:
parent
333b409170
commit
5dbced3a9f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user