Return-Path: X-Original-To: apmail-aurora-commits-archive@minotaur.apache.org Delivered-To: apmail-aurora-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BD1D317542 for ; Fri, 4 Sep 2015 18:53:07 +0000 (UTC) Received: (qmail 66661 invoked by uid 500); 4 Sep 2015 18:53:07 -0000 Delivered-To: apmail-aurora-commits-archive@aurora.apache.org Received: (qmail 66624 invoked by uid 500); 4 Sep 2015 18:53:07 -0000 Mailing-List: contact commits-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list commits@aurora.apache.org Received: (qmail 66615 invoked by uid 99); 4 Sep 2015 18:53:07 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2015 18:53:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 72896DFF6B; Fri, 4 Sep 2015 18:53:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: zmanji@apache.org To: commits@aurora.apache.org Message-Id: <1836db250d8c4ca2bad7be8f527f45e2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: aurora git commit: Disable mimetype guessing in the observer chroot browser. Date: Fri, 4 Sep 2015 18:53:07 +0000 (UTC) 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 Authored: Fri Sep 4 11:52:29 2015 -0700 Committer: Zameer Manji 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')