Fix Content-Length mismatch on range requests (206 Partial Content)
This commit is contained in:
@@ -999,6 +999,7 @@ def _apply_object_headers(
|
||||
etag: str,
|
||||
) -> None:
|
||||
if file_stat is not None:
|
||||
if response.status_code != 206:
|
||||
response.headers["Content-Length"] = str(file_stat.st_size)
|
||||
response.headers["Last-Modified"] = http_date(file_stat.st_mtime)
|
||||
response.headers["ETag"] = f'"{etag}"'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
APP_VERSION = "0.2.6"
|
||||
APP_VERSION = "0.2.7"
|
||||
|
||||
|
||||
def get_version() -> str:
|
||||
|
||||
Reference in New Issue
Block a user