The way the HTTP spec defines it, if the server knows how to support the Range
header, it will. That in turn, requires it to return a 206 Partial Content response code with a Content-Range
header, when it returns content to you. Otherwise, it will simply ignore the Range
header in your request, and return a 200 response code.
This might seem silly, but are you sure you're crafting a valid HTTP request header? All too commonly, I forget to specify HTTP/1.1 in the request, or forget to specify the Range specifier, such as "bytes".
Oh, and if all you want to do is check, then just send a HEAD request instead of a GET request. Same headers, same everything, just "HEAD" instead of "GET". If you receive a 206
response, you'll know Range
is supported, and otherwise you'll get a 200
response.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…