witten
/
luminotes
Archived
1
0
Fork 0

Possibly fixed a bug where IE 7 would fail to download as HTML via HTTPS

due to cache issues. The fix entailed using a new @weakly_expire decorator
on controller.Notebooks.download_html().
This commit is contained in:
Dan Helfman 2008-05-06 21:41:00 +00:00
parent 668c782781
commit bb77cefeaa
3 changed files with 22 additions and 2 deletions

6
NEWS
View File

@ -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.

View File

@ -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

View File

@ -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(