WP-Filebase Download Manager
[resolved] Range header not handled correctly (4 posts)

  1. mrogaski
    Posted 3 years ago #

    When a client requests a byte-range with the Range header, the response contain one byte less than the requested range.

    Per the spec, the byte at the second index is included. The following example should return two bytes instead of one.

    This impacts all iPhone downloads with the new iTunes app which requires and checks byte-range handling.

    GET /download/podcast/TheLairEpisode16.mp3 HTTP/1.1
    Host: thelairpodcast.com
    Range: bytes=0-1
    X-Playback-Session-Id: E2D24D9C-0EED-4408-AA01-04DE278ABF55
    Accept-Encoding: identity
    Accept: */*
    Connection: keep-alive
    Accept-Language: en-us
    User-Agent: AppleCoreMedia/ (iPhone; U; CPU OS 6_1_3 like Mac OS X; en_us)
    HTTP/1.1 206 Partial Content
    Date: Tue, 26 Mar 2013 03:40:47 GMT
    Server: Apache
    Cache-Control: must-revalidate, max-age=10
    Content-MD5: 8px8VXqMHOTDyBEdXTUKOw==
    ETag: "f29c7c557a8c1ce4c3c8111d5d350a3b"
    Accept-Ranges: bytes
    Last-Modified: Sat, 09 Mar 2013 00:21:39 GMT
    Content-Length: 1
    Content-Range: bytes 0-0/93828292
    Cache-Control: max-age=31536000
    Expires: Wed, 26 Mar 2014 03:40:47 GMT
    Vary: User-Agent
    Keep-Alive: timeout=2, max=100
    Connection: Keep-Alive
    Content-Type: audio/mpeg


  2. mrogaski
    Posted 3 years ago #

    I've sent a quick patch to the plugin maintainers.


  3. mrogaski
    Posted 3 years ago #

    And a corrected version to account for single-byte requests.


  4. Fabian
    Plugin Author

    Posted 3 years ago #

    Thanks for the patches, they will be included in the next update.


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic