ContentDispositionHeaderGuesser.guessMIME(String, boolean) instead
Given a filename, its MIME type, and a browser user agent, return a 'safe' mime type, depending on
the download policy configured, such that 'safe' browsers can display the executable text file without causing xss issues.
If the download policy is set to DownloadPolicy.Secure or DownloadPolicy.Insecure, then
the given mimeContentType will be returned.
If the download policy is set to DownloadPolicy.Smart, and the user agent is not Internet Explorer
, then for text files that can be displayed in plain text (e.g., text/html, as determined by
HostileExtensionDetector.isTextContentType(String) and HostileExtensionDetector.isTextExtension(String)),
a 'text/plain' mime type will be returned instead of the given mimeContentType.
Copyright © 2018 Atlassian. All rights reserved.