bump dependency versions

This commit is contained in:
David Lord 2018-02-06 08:03:09 -08:00
parent 8c2c802f19
commit af32ea0b94
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
4 changed files with 29 additions and 32 deletions

View file

@ -608,18 +608,13 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,
'headers' % filename, stacklevel=2)
if conditional:
if callable(getattr(Range, 'to_content_range_header', None)):
# Werkzeug supports Range Requests
# Remove this test when support for Werkzeug <0.12 is dropped
try:
rv = rv.make_conditional(request, accept_ranges=True,
complete_length=fsize)
except RequestedRangeNotSatisfiable:
if file is not None:
file.close()
raise
else:
rv = rv.make_conditional(request)
try:
rv = rv.make_conditional(request, accept_ranges=True,
complete_length=fsize)
except RequestedRangeNotSatisfiable:
if file is not None:
file.close()
raise
# make sure we don't send x-sendfile for servers that
# ignore the 304 status code for x-sendfile.
if rv.status_code == 304: