#2965 - S3 - GetObject - Treat empty Range-argument as a regular GET (#3531)

This commit is contained in:
Bert Blommers 2021-01-13 10:00:18 +00:00 committed by GitHub
commit df8bd43a45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -975,7 +975,11 @@ class ResponseObject(_TemplateEnvironmentMixin, ActionAuthenticatorMixin):
else:
status_code, response_headers, response_content = response
if status_code == 200 and "range" in request.headers:
if (
status_code == 200
and "range" in request.headers
and request.headers["range"] != ""
):
try:
return self._handle_range_header(
request, response_headers, response_content