# HG changeset patch # User Pierre-Yves David # Date 1355242077 -3600 # Node ID 3bb96935a6b9eaded22bc0ac9731c2d6137abf04 # Parent 51068fe1e39a61eaad8c5b86c62d67516724b671 [web] use `inline` `Content-Disposition` by default (closes #2535734) since known time we have been serving static file with a `filename` parameter on the `Content-Disposition` header. But since d74addac92bb we explicitly serve file as attachment if a filename is provided. However this is valid to have `inline` disposition and `filename` parameter. This changeset revert this part of d74addac92bb, going back to `inlined` by default. `IDownloadable` code explicitly request `attachment` content to preserve expected behavior. diff -r 51068fe1e39a -r 3bb96935a6b9 web/request.py --- a/web/request.py Tue Dec 11 16:57:18 2012 +0100 +++ b/web/request.py Tue Dec 11 17:07:57 2012 +0100 @@ -611,7 +611,7 @@ self.set_cookie(name, '', maxage=0, expires=date(2000, 1, 1)) def set_content_type(self, content_type, filename=None, encoding=None, - disposition='attachment'): + disposition='inline'): """set output content type for this request. An optional filename may be given. diff -r 51068fe1e39a -r 3bb96935a6b9 web/views/idownloadable.py --- a/web/views/idownloadable.py Tue Dec 11 16:57:18 2012 +0100 +++ b/web/views/idownloadable.py Tue Dec 11 17:07:57 2012 +0100 @@ -100,7 +100,8 @@ contenttype = adapter.download_content_type() self._cw.set_content_type(contenttype or self.content_type, filename=adapter.download_file_name(), - encoding=encoding) + encoding=encoding, + disposition='attachment') def call(self): entity = self.cw_rset.complete_entity(self.cw_row or 0, self.cw_col or 0)