Title: Support for HTTP &#8220;range&#8221; requests
Last modified: October 9, 2019

---

# Support for HTTP “range” requests

 *  Resolved [cconstantine](https://wordpress.org/support/users/cconstantine/)
 * (@cconstantine)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/support-for-http-range-requests/)
 * I’m trying to troubleshoot a problem reported with the Google Podcasts player
   on Android. (I’ve one reporting user and I cannot personally reproduce the problem.)
   In the process, I went down a rabbit hole looking into HTTP range requests.
 * I’m wondering: If the the SSP plugin is serving the MP3 audio files via PHP (
   which would require the PHP code to implement supporting range requests) or if,
   after a redirection from the stats-collection URL, it let’s my web server (Apache)
   just send out the static file (in which case Apache itself handles range requests.)
 * Thoughts?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsupport-for-http-range-requests%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [Jonathan Bossenger](https://wordpress.org/support/users/psykro/)
 * (@psykro)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/support-for-http-range-requests/#post-12021044)
 * [@cconstantine](https://wordpress.org/support/users/cconstantine/) thanks for
   getting in touch.
 * Do you perhaps have a URL describing HTTP range requests and how they relate 
   to serving files behind the PHP redirect, so that I can understand how it could
   be causing the problem? From the cursory review I’ve done, it would appear we
   should update the plugin to support range requests, would you agree?
 * Regards
 *  Thread Starter [cconstantine](https://wordpress.org/support/users/cconstantine/)
 * (@cconstantine)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/support-for-http-range-requests/#post-12021084)
 * …I _think_ it’s not actually a problem, but I wanted to doublecheck my analysis
   with someone familiar with the code.
 * For range requests, it’s [RFC7233]([https://tools.ietf.org/html/rfc7233](https://tools.ietf.org/html/rfc7233))—
   but before even bother looking at that. I think the answer is that SSP doesn’t
   handle the serving of the audio file via PHP, but rather leaves that to the underlying
   web server. (In my case, that’s Apache, which handles range requests of static
   assets.)
 * Straight from my RSS feed, I have (for example) `<enclosure url="https://moversmindset.
   com/podcast-download/4734/062-chris-and-shirley-darlington-rowat-serendipity-
   family-and-relationships.mp3" length="29493071" type="audio/mpeg"></enclosure
   >` and if I fetch that URL, I get SSP doing a redirection. Here I’m asking Curl
   to get me a range of bytes:
 *     ```
       Craigs-iMac:~ craig$ curl -I --range 500-600 https://moversmindset.com/podcast-download/4734/062-chris-and-shirley-darlington-rowat-serendipity-family-and-relationships.mp3
       HTTP/1.1 302 Found
       Date: Fri, 11 Oct 2019 14:55:48 GMT
       Server: Apache
       Pragma: no-cache
       Expires: 0
       Cache-Control: must-revalidate, post-check=0, pre-check=0
       Robots: none
       X-Redirect-By: WordPress
       Set-Cookie: PHPSESSID=6576b49ab4d78ab7628bb05a727805dd; path=/
       Location: https://moversmindset.com/wp-content/uploads/2019/10/MM_62_Chris_and_Shirley.mp3
       Content-Type: text/html; charset=UTF-8
       ```
   
 * …gives me a standard redirection. As expected since SSP wants to track statistics.
   That new location is a direct-link into the WP assets storage. When I Curl that,
   making a range request again, it works perfectly. (Apache is happy to give 101
   bytes.) Below is both the headers-only (-I in Curl) and full fetch….
 *     ```
       Craigs-iMac:~ craig$ curl -I --range 500-600 https://moversmindset.com/wp-content/uploads/2019/10/MM_62_Chris_and_Shirley.mp3
       HTTP/1.1 206 Partial Content
       Date: Fri, 11 Oct 2019 14:58:33 GMT
       Server: Apache
       Last-Modified: Sun, 06 Oct 2019 14:51:01 GMT
       Accept-Ranges: bytes
       Content-Length: 101
       Vary: Accept-Encoding
       Content-Range: bytes 500-600/29493071
       Content-Type: audio/mpeg
   
       Craigs-iMac:~ craig$ curl --range 500-600 https://moversmindset.com/wp-content/uploads/2019/10/MM_62_Chris_and_Shirley.mp3 > ./foo
         % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                        Dload  Upload   Total   Spent    Left  Speed
       100   101  100   101    0     0    389      0 --:--:-- --:--:-- --:--:--   388
       Craigs-iMac:~ craig$ ls -alh ./foo
       -rw-r--r--  1 craig  staff   101B Oct 11 10:58 ./foo
       ```
   
 * So I think the answer is SSP doesn’t _interfere_ with HTTP range requests. And
   that means the problem I’m trying to solve can’t be caused by my site not correctly
   answering range requests.
 *  Thread Starter [cconstantine](https://wordpress.org/support/users/cconstantine/)
 * (@cconstantine)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/support-for-http-range-requests/#post-12039025)
 * Further digging revealed that our Apache server was [mis]configured to apply 
   the DEFLATE module (aka gzip) to media files. Turns out that **content-encoding**(
   not to be confused with transfer-encoding) is not compatible with range HTTP 
   requests.
 * [https://stackoverflow.com/questions/33947562/is-it-possible-to-send-http-response-using-gzip-and-byte-ranges-at-the-same-time](https://stackoverflow.com/questions/33947562/is-it-possible-to-send-http-response-using-gzip-and-byte-ranges-at-the-same-time)
 *  Plugin Contributor [Jonathan Bossenger](https://wordpress.org/support/users/psykro/)
 * (@psykro)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/support-for-http-range-requests/#post-12040571)
 * [@cconstantine](https://wordpress.org/support/users/cconstantine/) thanks for
   the update. I’ll see if we can get this added to our support documents.

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

The topic ‘Support for HTTP “range” requests’ is closed to new replies.

 * ![](https://ps.w.org/seriously-simple-podcasting/assets/icon-256x256.png?rev=
   970355)
 * [Seriously Simple Podcasting](https://wordpress.org/plugins/seriously-simple-podcasting/)
 * [Support Threads](https://wordpress.org/support/plugin/seriously-simple-podcasting/)
 * [Active Topics](https://wordpress.org/support/plugin/seriously-simple-podcasting/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/seriously-simple-podcasting/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/seriously-simple-podcasting/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Jonathan Bossenger](https://wordpress.org/support/users/psykro/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/support-for-http-range-requests/#post-12040571)
 * Status: resolved