Commit 7e02fd27 authored by Julian Watson's avatar Julian Watson Committed by Commit Bot

terminal: send mime types for terminal files

BUG=999950

Change-Id: Ia2e6e313824badc43ffb2eb68688c60171806cdb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816003
Commit-Queue: Julian Watson <juwa@google.com>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Auto-Submit: Julian Watson <juwa@google.com>
Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699180}
parent b2f1afee
......@@ -71,3 +71,8 @@ std::string TerminalSource::GetMimeType(const std::string& path) {
net::GetWellKnownMimeTypeFromExtension(ext.substr(1), &mime_type);
return mime_type;
}
bool TerminalSource::ShouldServeMimeTypeAsContentTypeHeader() {
// TerminalSource pages include js modules which require an explicit MimeType.
return true;
}
......@@ -31,6 +31,8 @@ class TerminalSource : public content::URLDataSource {
std::string GetMimeType(const std::string& path) override;
bool ShouldServeMimeTypeAsContentTypeHeader() override;
DISALLOW_COPY_AND_ASSIGN(TerminalSource);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment