Skip to content
Myr

Don't fail for unicode filenames with send_file(add_etags=True)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Simon Sapin · committed by Simon Sapin · parent e3f2dd8 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:flask/helpers.py+4 added-1 removed
377 unmodified lines
378 if add_etags and filename is not None:379 rv.set_etag('flask-%s-%s-%s' % (380 os.path.getmtime(filename),381 os.path.getsize(filename),382 adler32(filename) & 0xffffffff382 adler32(383 filename.encode('utf8') if isinstance(filename, unicode)384 else filename385 ) & 0xffffffff386 ))387 if conditional:388 rv = rv.make_conditional(request)389 # make sure we don't send x-sendfile for servers that
131 unmodified lines