Repository: aurora Updated Branches: refs/heads/master 9c0b1b239 -> 277382633
Disable mimetype guessing in the observer chroot browser. This disables the mimetype guessing of files served by the chroot browser and sets it to the standard `application/octet-stream` mimetype. This prevents browsers from trying to decompress gzipped files or other surprising behaviour for users. Testing Done: ./pants test src/test/python/apache/thermos/observer:: Manual inspection of Content-Type header via vagrant. Bugs closed: AURORA-1479 Reviewed at https://reviews.apache.org/r/38111/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/27738263 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/27738263 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/27738263 Branch: refs/heads/master Commit: 277382633fafa2e2aa17d6bf49c09df8a459025d Parents: 9c0b1b2 Author: Zameer Manji <[email protected]> Authored: Fri Sep 4 11:52:29 2015 -0700 Committer: Zameer Manji <[email protected]> Committed: Fri Sep 4 11:52:29 2015 -0700 ---------------------------------------------------------------------- src/main/python/apache/thermos/observer/http/file_browser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/27738263/src/main/python/apache/thermos/observer/http/file_browser.py ---------------------------------------------------------------------- diff --git a/src/main/python/apache/thermos/observer/http/file_browser.py b/src/main/python/apache/thermos/observer/http/file_browser.py index 1750f5b..d099665 100644 --- a/src/main/python/apache/thermos/observer/http/file_browser.py +++ b/src/main/python/apache/thermos/observer/http/file_browser.py @@ -133,4 +133,4 @@ class TaskObserverFileBrowser(object): chroot, path = self._observer.valid_path(task_id, path) if path is None: bottle.abort(404, "No such file") - return bottle.static_file(path, root=chroot, download=True) + return bottle.static_file(path, root=chroot, download=True, mimetype='application/octet-stream')
