diff --git a/aiohttp/file_sender.py b/aiohttp/file_sender.py index 4255881c259..e1708f778b4 100644 --- a/aiohttp/file_sender.py +++ b/aiohttp/file_sender.py @@ -176,7 +176,8 @@ def send(self, request, filepath): # If a range request has been made, convert start, end slice notation # into file pointer offset and count if start is not None or end is not None: - status = HTTPPartialContent.status_code + if start > 0 or end: + status = HTTPPartialContent.status_code if start is None and end < 0: # return tail of file start = file_size + end count = -end