File tree 5 files changed +5
-4
lines changed
azure-storage-file-share/azure/storage/fileshare
5 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 7
7
### Breaking Changes
8
8
9
9
### Bugs Fixed
10
+ - Fixed possible invalid content range exception that gets raised when downloading empty blobs through Azurite.
10
11
11
12
### Other Changes
12
13
- Removed ` msrest ` dependency.
Original file line number Diff line number Diff line change @@ -431,7 +431,7 @@ def _initial_request(self):
431
431
# Parse the total file size and adjust the download size if ranges
432
432
# were specified
433
433
self ._file_size = parse_length_from_content_range (response .properties .content_range )
434
- if not self ._file_size :
434
+ if self ._file_size is None :
435
435
raise ValueError ("Required Content-Range response header is missing or malformed." )
436
436
# Remove any extra encryption data size from blob size
437
437
self ._file_size = adjust_blob_size_for_encryption (self ._file_size , self ._encryption_data )
Original file line number Diff line number Diff line change @@ -353,7 +353,7 @@ async def _initial_request(self):
353
353
# Parse the total file size and adjust the download size if ranges
354
354
# were specified
355
355
self ._file_size = parse_length_from_content_range (response .properties .content_range )
356
- if not self ._file_size :
356
+ if self ._file_size is None :
357
357
raise ValueError ("Required Content-Range response header is missing or malformed." )
358
358
# Remove any extra encryption data size from blob size
359
359
self ._file_size = adjust_blob_size_for_encryption (self ._file_size , self ._encryption_data )
Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ def _initial_request(self):
311
311
# Parse the total file size and adjust the download size if ranges
312
312
# were specified
313
313
self ._file_size = parse_length_from_content_range (response .properties .content_range )
314
- if not self ._file_size :
314
+ if self ._file_size is None :
315
315
raise ValueError ("Required Content-Range response header is missing or malformed." )
316
316
317
317
if self ._end_range is not None :
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ async def _initial_request(self):
264
264
# Parse the total file size and adjust the download size if ranges
265
265
# were specified
266
266
self ._file_size = parse_length_from_content_range (response .properties .content_range )
267
- if not self ._file_size :
267
+ if self ._file_size is None :
268
268
raise ValueError ("Required Content-Range response header is missing or malformed." )
269
269
270
270
if self ._end_range is not None :
You can’t perform that action at this time.
0 commit comments