S3: get_object() now returns the AcceptRanges header (#6121)

This commit is contained in:
Bert Blommers 2023-03-24 10:55:56 -01:00 committed by GitHub
parent e3244a9678
commit ea96013957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -1364,6 +1364,7 @@ class S3Response(BaseResponse):
response_headers.update(key.metadata)
response_headers.update(key.response_dict)
response_headers.update({"AcceptRanges": "bytes"})
return 200, response_headers, key.value
def _key_response_put(self, request, body, bucket_name, query, key_name):

View File

@ -73,6 +73,7 @@ def test_s3_server_bucket_create(key_name):
res = test_client.get(f"/{key_name}", "http://foobaz.localhost:5000/")
res.status_code.should.equal(200)
res.data.should.equal(b"test value")
assert res.headers.get("AcceptRanges") == "bytes"
def test_s3_server_ignore_subdomain_for_bucketnames():