mirror of https://gitlab.com/bashrc2/epicyon
use sha1 for etags
parent
13826ca5cb
commit
47860b081b
|
@ -17,6 +17,7 @@ import email.parser
|
||||||
# for saving images
|
# for saving images
|
||||||
from binascii import a2b_base64
|
from binascii import a2b_base64
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
|
from hashlib import sha1
|
||||||
from session import createSession
|
from session import createSession
|
||||||
from webfinger import webfingerMeta
|
from webfinger import webfingerMeta
|
||||||
from webfinger import webfingerNodeInfo
|
from webfinger import webfingerNodeInfo
|
||||||
|
@ -396,7 +397,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if not etag:
|
if not etag:
|
||||||
etag=sha256(data).hexdigest()
|
etag=sha1(data).hexdigest()
|
||||||
try:
|
try:
|
||||||
with open(mediaFilename+'.etag', 'w') as etagFile:
|
with open(mediaFilename+'.etag', 'w') as etagFile:
|
||||||
etagFile.write(etag)
|
etagFile.write(etag)
|
||||||
|
|
Loading…
Reference in New Issue