(refs #738)Set "application/octet-stream" as Content-Type to avoid automatic charset detection for text files in Scalatra

This commit is contained in:
Naoki Takezoe
2015-05-10 17:36:07 +09:00
parent a08c4368b7
commit 9a8eef7b19

View File

@@ -294,7 +294,7 @@ trait RepositoryViewerControllerBase extends ControllerBase {
if(raw){
// Download
JGitUtil.getContentFromId(git, objectId, true).map { bytes =>
RawData(FileUtil.getContentType(path, bytes), bytes)
RawData("application/octet-stream", bytes)
} getOrElse NotFound
} else {
html.blob(id, repository, path.split("/").toList,