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:
parent
668c782781
commit
bb77cefeaa
6
NEWS
6
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
|
1.3.14: May 5, 2008
|
||||||
* Fixed a database indexing bug that prevented notes with really long (~2700+
|
* Fixed a database indexing bug that prevented notes with really long (~2700+
|
||||||
character) titles from saving correctly.
|
character) titles from saving correctly.
|
||||||
|
|
|
@ -13,3 +13,17 @@ def strongly_expire( function ):
|
||||||
return function( *args, **kwargs )
|
return function( *args, **kwargs )
|
||||||
|
|
||||||
return expire
|
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
|
||||||
|
|
|
@ -6,7 +6,7 @@ from Expose import expose
|
||||||
from Validate import validate, Valid_string, Validation_error, Valid_bool, Valid_int
|
from Validate import validate, Valid_string, Validation_error, Valid_bool, Valid_int
|
||||||
from Database import Valid_id, Valid_revision, end_transaction
|
from Database import Valid_id, Valid_revision, end_transaction
|
||||||
from Users import grab_user_id, Access_error
|
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_nuker import Html_nuker
|
||||||
from Html_differ import Html_differ
|
from Html_differ import Html_differ
|
||||||
from model.Notebook import Notebook
|
from model.Notebook import Notebook
|
||||||
|
@ -974,7 +974,7 @@ class Notebooks( object ):
|
||||||
)
|
)
|
||||||
|
|
||||||
@expose( view = Html_file )
|
@expose( view = Html_file )
|
||||||
@strongly_expire
|
@weakly_expire
|
||||||
@end_transaction
|
@end_transaction
|
||||||
@grab_user_id
|
@grab_user_id
|
||||||
@validate(
|
@validate(
|
||||||
|
|
Reference in New Issue