What is the professional way of serving HTTP 206 responses -
if server set-up handle range requests, accepting bytes instance, there 2 ways of sending valid request server.
the first set range header range: 0-, meaning want first byte of whatever server serving , lazy rest of content. give as server can.
the second set range header range: 0-2000/*, meaning explicitly want bytes 0 through 2000 , don't care how large file server serving.
these requests - if deemed valid server (which state, indeed valid) - answered http 206 responses.
my question is: professional approach serving file through partial responses, discussed above. serving bytes client sent request not have @ once, i.e. if request range: 0- comes in serving bytes 0 through last byte? or split file , when request range: 0- comes in serve number of bytes, i.e. bytes 0 through 500? or different alltogether?
i have question because current code base of mine seems blocking, no more 5 or requests can handled @ given time.
from rfc7233, section 2.1:
a client can limit number of bytes requested without knowing size of selected representation. if last-byte-pos value absent, or if value greater or equal current length of representation data, byte range interpreted remainder of representation (i.e., server replaces value of last-byte-pos value 1 less current length of selected representation).
so means range like:
range: 0- should interpreted 'serve entire file'.
Comments
Post a Comment