Issue #667 resolved

Plaintext files are forced to be downloaded as attachments (BB-706)

Brodie Rao
staff created an issue

Given a file with a text MIME type, instead of displaying it in the browser, Safari is forced to download it as an attachment:

{{{ $ curl -I http://bitbucket.org/parren/hg-pbranch/raw/pbranch-graphdesc/hgext/pbranch.py HTTP/1.1 200 OK Server: nginx/0.6.32 Date: Mon, 18 May 2009 12:30:46 GMT Content-Type: text/x-python Transfer-Encoding: chunked Connection: keep-alive Vary: Cookie Content-Disposition: attachment }}}

The Content-Disposition header should be set to inline or dropped completely for any text/* MIME type that isn't executed by the browser.

Comments (4)

  1. Brodie Rao staff reporter

    I'm not sure when we fixed this (I reported this issue long before I worked on Bitbucket!), but at any rate, it's fixed now.

    For security reasons we can't render HTML from repos in the browser, but any plain text file should show up inside the browser now.

  2. Log in to comment