CS FundamentalsHardGATE CS · product-company placement

A download of a 10,000,000-byte file over HTTP broke after the first 4,000,000 bytes (bytes 0 to 3,999,999) arrived. To resume, which request header does the client send, and what response does a supporting server give?

  1. A. Range: bytes=4000000- ; 206 with Content-Range: bytes 4000000-9999999/10000000
  2. B. Range: bytes=4000001- ; 206 with Content-Range: bytes 4000001-10000000/10000000
  3. C. Range: bytes=4000000- ; 200 with Content-Range: bytes 4000000-10000000/10000000
  4. D. Range: bytes=3999999- ; 206 with Content-Range: bytes 3999999-9999999/10000000

Correct answer: A. Range: bytes=4000000- ; 206 with Content-Range: bytes 4000000-9999999/10000000

Byte ranges are zero-based and inclusive, so the next needed byte is 4,000,000 and the last is 9,999,999. A partial response uses 206 Partial Content; 200 would mean the whole body is sent.

More Computer Networks questions

Exams that ask this topic