summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst2
-rwxr-xr-xbottle.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/README.rst b/README.rst
index 1dd6266..3d2d165 100644
--- a/README.rst
+++ b/README.rst
@@ -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.
diff --git a/bottle.py b/bottle.py
index 3674d50..c556baf 100755
--- a/bottle.py
+++ b/bottle.py
@@ -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