気の向くままに書き綴る

勉強会参加したメモや日々の思ったことのメモ等

httpd apache のbyte-range

Apache Week. HTTP/1.1

Byte ranges allow browsers to request parts of documents. This can be used to continue an interrupted transfer, or to obtain just part of a long document (say, a single page).

Byte ranges are implemented by theRangeheader. For example, to request just the second 500-bytes of a document, the request would include:

  Range: bytes=500-999

A single request can also ask for more than one range at once (for example, it could ask for the first 500 bytes and the last 500 bytes of a file). When the server replies, it will send back each part in a single response, using MIME multipart encoding to distinguish the parts.