mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-07-13 22:22:22 +02:00
(refs #738)Set "application/octet-stream" as Content-Type to avoid automatic charset detection for text files in Scalatra
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user