2016-09-26 68 views

回答

0

本標準RFC 7233。從2.1 Byte Ranges

The first-byte-pos value in a byte-range-spec gives the byte-offset 
of the first byte in a range. The last-byte-pos value gives the 
byte-offset of the last byte in the range; that is, the byte 
positions specified are inclusive. Byte offsets start at zero. 

4.2 Content-Range將此應用於該實施例:

The following are examples of Content-Range values in which the 
selected representation contains a total of 1234 bytes: 

o The first 500 bytes: 

    Content-Range: bytes 0-499/1234 

由於範圍從零開始,0是第一個字節和499是第500個。所以,1233是1234字節文檔的最後一個字節。

+1

謝謝。所以Content-Length是文件的實際大小。 – Prajwal