diff options
-rw-r--r-- | README.rst | 2 | ||||
-rwxr-xr-x | bottle.py | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -79,4 +79,4 @@ License Code and documentation are available according to the MIT License (see LICENSE__). -The Bottle logo however is *NOT* covered by that license. It is allowed to use the logo as a link to the bottle homepage or in direct context with the unmodified library. In all other cases please ask first. +The Bottle logo however is *NOT* covered by that license. It is allowed to use the logo as a link to the bottle homepage or in direct context with the unmodified library. In all other cases, please ask first. @@ -2884,9 +2884,9 @@ def static_file(filename, root, stats = os.stat(filename) headers['Content-Length'] = clen = stats.st_size - lm = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(stats.st_mtime)) - headers['Last-Modified'] = lm - headers['Date'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()) + headers['Last-Modified'] = email.utils.formatdate(stats.st_mtime, + usegmt=True) + headers['Date'] = email.utils.formatdate(time.time(), usegmt=True) getenv = request.environ.get |