1

My understanding of the HTTP 1.1RFC that outlines ranges is that when the server response has a header of Accept-Ranges, the client can make a range request, as outlined well in this wiki page

My confusion is how does the client initiate the processes?

  1. Does the client assume the server accepts ranges, and sends a request for a partial range?
  2. Or does the client begin by checking if the server accepts ranges first?

This [StackOverflow] 3 answer does a good job of explaining it, but the comments below it make it confusing again

If it's 2 then does the initial request have the filename? Or is that not specified in the RFC?

Community
  • 1
  • 1
Sam Hammamy
  • 10,819
  • 10
  • 56
  • 94

1 Answers1

0

According to section 2.3 of RFC7233 :

The "Accept-Ranges" header field allows a server to indicate that it supports range requests for the target resource.

[...]

An origin server that supports byte-range requests for a given target resource MAY send

Accept-Ranges: bytes

to indicate what range units are supported. A client MAY generate range requests without having received this header field for the resource involved.

The answer to your question is both. A client can wait to check if the server support range request or he can generate a range requests without having received this header field.

Community
  • 1
  • 1
Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240