cloudserver icon indicating copy to clipboard operation
cloudserver copied to clipboard

CloudServer should advertise support for range requests on 200 (OK) responses

Open IRQs opened this issue 7 years ago • 1 comments

Feature Request

Proposal

When retrieving an object with a "regular" GET request, CloudServer should advertise its support for range requests even when no Range: header is present in the original request. To my knowledge, Amazon's S3 servers always advertise it. While it is not required to send those headers, certain clients might assume that range requests are not supported if the initial request doesn't return Accept-Ranges: bytes.

Current behavior

If a GET object request without a Range: bytes=... header was fulfilled successfully (200), the returned response headers do not contain the Accept-Ranges: bytes header.

Desired behavior

The Accept-Ranges: bytes header should also be included when fulfilling a regular GET object request.

Use case

When playing an MP3 with the built-in media player of Firefox (tested with 58.0.2), the browser first sends a regular GET request. If the response doesn't include the Accept-Ranges: bytes header, Firefox assumes that partial downloads are not supported and disables the seek capability. Thus it is not possible to jump to an arbitrary position within the audio stream. If the header is included, Firefox resends the request with an appropriate Range: bytes=... header and starts streaming the file. In this case, seeking is supported, resulting in a much better user experience.

IRQs avatar Feb 21 '18 13:02 IRQs

Hi @IRQs Thanks for bringing it our attention. I can see how that may impact some clients relying on the range header. I will postback when we have the PR made.

rahulreddy avatar Mar 09 '18 23:03 rahulreddy