mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1021156 - Ignore Content-Disposition attachment for OMA FL DRM files on B2G. r=bz
This commit is contained in:
parent
5899b96884
commit
03a68048bc
@ -367,8 +367,23 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports *
|
||||
bool forceExternalHandling = false;
|
||||
uint32_t disposition;
|
||||
rv = aChannel->GetContentDisposition(&disposition);
|
||||
if (NS_SUCCEEDED(rv) && disposition == nsIChannel::DISPOSITION_ATTACHMENT)
|
||||
|
||||
bool allowContentDispositionToForceExternalHandling = true;
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
|
||||
// On B2G, OMA content files should never be handled by an external handler
|
||||
// (even if the server specifies Content-Disposition: attachment) because the
|
||||
// data should never be stored on an unencrypted form.
|
||||
allowContentDispositionToForceExternalHandling =
|
||||
!mContentType.LowerCaseEqualsASCII("application/vnd.oma.drm.message");
|
||||
|
||||
#endif
|
||||
|
||||
if (NS_SUCCEEDED(rv) && (disposition == nsIChannel::DISPOSITION_ATTACHMENT) &&
|
||||
allowContentDispositionToForceExternalHandling) {
|
||||
forceExternalHandling = true;
|
||||
}
|
||||
|
||||
LOG((" forceExternalHandling: %s", forceExternalHandling ? "yes" : "no"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user