diff --git a/NEWS b/NEWS index ab54773..46b81e6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +1.3.15: May 6, 2008 + * Fixed a bug where the "show on startup" checkbox did not appear checked if + you created a startup note, hid it, and then opened it the note tree area. + * Possibly fixed a bug where IE 7 would fail to download as HTML via HTTPS + due to cache issues. + 1.3.14: May 5, 2008 * Fixed a database indexing bug that prevented notes with really long (~2700+ character) titles from saving correctly. diff --git a/controller/Expire.py b/controller/Expire.py index 70d17b9..cac12b4 100644 --- a/controller/Expire.py +++ b/controller/Expire.py @@ -13,3 +13,17 @@ def strongly_expire( function ): return function( *args, **kwargs ) return expire + + +def weakly_expire( function ): + """ + Decorator that sends headers that instruct browsers and proxies not to cache. This cache busting + isn't as strong as the @strongly_expire decorator, but it has the distinct benefit of not + breaking Internet Explorer HTTPS file downloads. + """ + def expire( *args, **kwargs ): + cherrypy.response.headers[ "Expires" ] = "Sun, 19 Nov 1978 05:00:00 GMT" + + return function( *args, **kwargs ) + + return expire diff --git a/controller/Notebooks.py b/controller/Notebooks.py index 80f5b1d..00a0444 100644 --- a/controller/Notebooks.py +++ b/controller/Notebooks.py @@ -6,7 +6,7 @@ from Expose import expose from Validate import validate, Valid_string, Validation_error, Valid_bool, Valid_int from Database import Valid_id, Valid_revision, end_transaction from Users import grab_user_id, Access_error -from Expire import strongly_expire +from Expire import strongly_expire, weakly_expire from Html_nuker import Html_nuker from Html_differ import Html_differ from model.Notebook import Notebook @@ -974,7 +974,7 @@ class Notebooks( object ): ) @expose( view = Html_file ) - @strongly_expire + @weakly_expire @end_transaction @grab_user_id @validate(