Skip to content
Myr

Do not use Date, use Last-Modified. This fixes #164

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 94f90bc · Browse files · 2 files+4 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−6 removed

  • other:+4 added−6 removed

2 files+4 added−6 removed

modified:flask/helpers.py+2 added-6 removed
362 unmodified lines
363 rv = current_app.response_class(data, mimetype=mimetype, headers=headers,364 direct_passthrough=True)365366 # if we know the file modification date, we can store it as the367 # current time to better support conditional requests. Werkzeug368 # as of 0.6.1 will override this value however in the conditional369 # response with the current time. This will be fixed in Werkzeug370 # with a new release, however many WSGI servers will still emit371 # a separate date header.367 # the time of the last modification.368 if mtime is not None:373 rv.date = int(mtime)369 rv.last_modified = int(mtime)370371 rv.cache_control.public = True372 if cache_timeout:373 rv.cache_control.max_age = cache_timeout
123 unmodified lines
modified:CHANGES+2 added
31 unmodified lines
32 rules added to the url map.33- Added an `endpoint` method to the flask application object which34 allows one to register a callback to an arbitrary endpoint with35 a decorator.36- Use Last-Modified for static file sending instead of Date which37 was incorrectly introduced in 0.6.3839Version 0.6.140-------------41
159 unmodified lines