This commit is contained in:
ed 2021-06-08 23:43:00 +02:00
parent 22396e8c33
commit a359d64d44
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,6 @@
# coding: utf-8
VERSION = (0, 11, 10)
VERSION = (0, 11, 11)
CODENAME = "the grid"
BUILD_DT = (2021, 6, 8)

View file

@ -994,6 +994,8 @@ class HttpCli(object):
cli_lastmod = self.headers.get("if-modified-since")
if cli_lastmod:
try:
# some browser append "; length=573"
cli_lastmod = cli_lastmod.split(";")[0].strip()
cli_dt = time.strptime(cli_lastmod, HTTP_TS_FMT)
cli_ts = calendar.timegm(cli_dt)
return file_lastmod, int(file_ts) > int(cli_ts)