From 8952b8251e542ce829ca298a4f0ee3ad26eab648 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 19 May 2015 16:29:54 +0530 Subject: [PATCH] ... --- src/calibre/srv/respond.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/srv/respond.py b/src/calibre/srv/respond.py index 4b949fa77c..a5356f0d32 100644 --- a/src/calibre/srv/respond.py +++ b/src/calibre/srv/respond.py @@ -76,7 +76,7 @@ class FileSystemOutputFile(object): pos = output.tell() output.seek(0, os.SEEK_END) self.content_length = output.tell() - pos - self.etag = hashlib.sha1(type('')(os.fstat(output.fileno()).st_mtime) + force_unicode(output.name or '')).hexdigest() + self.etag = '"%s"' % hashlib.sha1(type('')(os.fstat(output.fileno()).st_mtime) + force_unicode(output.name or '')).hexdigest() output.seek(pos) self.accept_ranges = True @@ -125,7 +125,7 @@ class StaticGeneratedOutput(object): def __init__(self, data): self.data = data - self.etag = hashlib.sha1(data).hexdigest() + self.etag = '"%s"' % hashlib.sha1(data).hexdigest() self.content_length = len(data) self.accept_ranges = False