WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mrogaski
    Member
    Posted 1 year 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/1.0.0.10B329 (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
    
    I

    http://wordpress.org/extend/plugins/wp-filebase/

  2. mrogaski
    Member
    Posted 1 year ago #

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

    http://pastebin.com/4Ekpn9nQ

  3. mrogaski
    Member
    Posted 1 year ago #

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

    http://pastebin.com/7t7uyAEr

  4. Fabian
    Member
    Plugin Author

    Posted 1 year ago #

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

    Regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic