mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1217501 P1 Expose Accept and Accept-Language to service worker FetchEvent.request. r=mcmanus
This commit is contained in:
parent
61d513264c
commit
5b1962a08d
@ -430,16 +430,19 @@ nsHttpHandler::AddStandardRequestHeaders(nsHttpHeaderArray *request, bool isSecu
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// MIME based content negotiation lives!
|
||||
// Add the "Accept" header
|
||||
// Add the "Accept" header. Note, this is set as an override because the
|
||||
// service worker expects to see it. The other "default" headers are
|
||||
// hidden from service worker interception.
|
||||
rv = request->SetHeader(nsHttp::Accept, mAccept,
|
||||
false, nsHttpHeaderArray::eVarietyDefault);
|
||||
false, nsHttpHeaderArray::eVarietyOverride);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// Add the "Accept-Language" header
|
||||
// Add the "Accept-Language" header. This header is also exposed to the
|
||||
// service worker.
|
||||
if (!mAcceptLanguages.IsEmpty()) {
|
||||
// Add the "Accept-Language" header
|
||||
rv = request->SetHeader(nsHttp::Accept_Language, mAcceptLanguages,
|
||||
false, nsHttpHeaderArray::eVarietyDefault);
|
||||
false, nsHttpHeaderArray::eVarietyOverride);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user