Title: Range header not handled correctly
Last modified: August 20, 2016

---

# Range header not handled correctly

 *  Resolved [mrogaski](https://wordpress.org/support/users/mrogaski/)
 * (@mrogaski)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/range-header-not-handled-correctly/)
 * When a client requests a byte-range with the Range header, the response contain
   one byte less than the requested range.
 * Per the [spec](http://tools.ietf.org/html/rfc2616#section-14.35), 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/](http://wordpress.org/extend/plugins/wp-filebase/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [mrogaski](https://wordpress.org/support/users/mrogaski/)
 * (@mrogaski)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/range-header-not-handled-correctly/#post-3597648)
 * I’ve sent a quick patch to the plugin maintainers.
 * [http://pastebin.com/4Ekpn9nQ](http://pastebin.com/4Ekpn9nQ)
 *  Thread Starter [mrogaski](https://wordpress.org/support/users/mrogaski/)
 * (@mrogaski)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/range-header-not-handled-correctly/#post-3597649)
 * And a corrected version to account for single-byte requests.
 * [http://pastebin.com/7t7uyAEr](http://pastebin.com/7t7uyAEr)
 *  Plugin Author [Fabian](https://wordpress.org/support/users/fabifott/)
 * (@fabifott)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/range-header-not-handled-correctly/#post-3597651)
 * Thanks for the patches, they will be included in the next update.
 * Regards

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Range header not handled correctly’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-filebase_ffff6e.svg)
 * [WP-Filebase Download Manager](https://wordpress.org/plugins/wp-filebase/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-filebase/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-filebase/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-filebase/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-filebase/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-filebase/reviews/)

## Tags

 * [iphone](https://wordpress.org/support/topic-tag/iphone/)
 * [itunes](https://wordpress.org/support/topic-tag/itunes/)
 * [range](https://wordpress.org/support/topic-tag/range/)

 * 3 replies
 * 2 participants
 * Last reply from: [Fabian](https://wordpress.org/support/users/fabifott/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/range-header-not-handled-correctly/#post-3597651)
 * Status: resolved