spray/spray — pull request #612 by danielwegener (2013-10-20 22:14:31+00:00)
Title: + Support Range Requests

Add support for ranged requests in spray. Ranged requests allows clients to use random-access streaming of http entities. A client may ask for partial content range(s) of http entities.

This pull requests implements the following ietf draft (already part of rfc2616?): http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-24

TL;DR, the benefits:
- Clients can recover from interrupted downloads.
- Video players can just stream "as much as they need" (i.e. chrome html5 video player requires range support).
- Clients can request known file-parts with meta data (i.e. id3-tags, Exif) without downloading a whole file

This pull request:

- Adds support for the headers _Accept-Ranges_, _Content-Range_ and _Range_.
- Adds a directive for _contentRangeSupport_.
- Adds Marshallers/Unmarshallers for multipart/byteranges
- Extends the _getFromFile_-Directive to support ranged request