Show More
@@ -820,7 +820,7 b' class FileFindHandler(web.StaticFileHandler):' | |||
|
820 | 820 | raise HTTPError(403, "%s is not a file", path) |
|
821 | 821 | |
|
822 | 822 | stat_result = os.stat(abspath) |
|
823 | modified = datetime.datetime.fromtimestamp(stat_result[stat.ST_MTIME]) | |
|
823 | modified = datetime.datetime.utcfromtimestamp(stat_result[stat.ST_MTIME]) | |
|
824 | 824 | |
|
825 | 825 | self.set_header("Last-Modified", modified) |
|
826 | 826 | |
@@ -844,7 +844,7 b' class FileFindHandler(web.StaticFileHandler):' | |||
|
844 | 844 | ims_value = self.request.headers.get("If-Modified-Since") |
|
845 | 845 | if ims_value is not None: |
|
846 | 846 | date_tuple = email.utils.parsedate(ims_value) |
|
847 |
if_since = datetime.datetime |
|
|
847 | if_since = datetime.datetime(*date_tuple[:6]) | |
|
848 | 848 | if if_since >= modified: |
|
849 | 849 | self.set_status(304) |
|
850 | 850 | return |
General Comments 0
You need to be logged in to leave comments.
Login now