The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can we enable byte-range requests?

Discussion in 'General Discussion' started by jols, Aug 8, 2012.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Hi Folks,

    I just received this from a hosted customer on our newest cPanel server, and for the life of me, I can find very little info about this:

    -----------
    I'm attempting to get our RSS feed on our site indexed in itunes, but I keep getting the same error message when I attempt to set it up:

    "There is a problem with your feed. Your episodes are hosted on a server which doesn't support byte-range requests. Enable byte-range requests and try your submission again."

    Does anyone know how we could enable byte-range requests for this guy?

    Thanks much.
     
  2. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Did anyone ever figure this out???
     
  3. dualmonitor

    dualmonitor Active Member

    Joined:
    Dec 3, 2012
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Yes, information about this would be very helpful! I have been receiving similar emails from Apple to enable Byte Range Requests on the server where my podcast is hosted.
     
  4. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    So, Apple has this to say to people who ask them about Byte-Range Requests:

    So we will start losing hosting customers because cPanel can't support this.. But then I found an FAQ on another hosting provider. and they do run cPanel.

    So apparently cPanel *CAN* support byte-range requests. We just need to find out how the hell to enable it.

    Anyone from cPanel support/development care to chime in here???
     
  5. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    It's interesting how you read that. You read it as "cPanel sucks because they don't support byte range requests." I read it as "Apple, like any large company who likes to push everyone around, passes the buck yet again."

    Regardless of whether or not cPanel should / could / would support byte range requests, Apple sucks for blatantly passing the buck like that. The iPhone requires that because that's the way Apple likes it. So Apple should not be insinuating that cPanel hosting is garbage and that everyone should find a non-cPanel hosting environment.

    Mike
     
  6. Jeff Shotnik

    Jeff Shotnik Well-Known Member

    Joined:
    Oct 10, 2012
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Denver, Colorado, United States
    cPanel Access Level:
    DataCenter Provider
    I don't see this as a cpanel issue at all. Likely you're using apache, that is where you need to enable byte range requests. if mod_headers is loaded, you should be able to use the 'Accept-Ranges' directive for this.
     
  7. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Incidentally, all the cpanel servers I manage do indeed support byte range requests. If yours doesn't, perhaps your host [in the past] had specifically made some changes to prevent a certain DOS ( http://httpd.apache.org/security/CVE-2011-3192.txt ) and then didn't undo the mitigation changes once they updated to a version of Apache that fixed that vulnerability.

    I got these instructions off the net [to test whether the server supports it]:

    1. Create a file [such as testrange.php] and put the following in that file:

    Code:
    <?php
    $range = '60-120';
    $host = "www.yourdomain.com";
    $socket = fsockopen($host,80);
    $packet = "GET /path/to/some/image.png HTTP/1.1\r\nHost: $host\r\nRange:bytes=$range\r\nAccept-Encoding: gzip\r\nConnection: close\r\n\r\n";
    fwrite($socket,$packet);
    echo fread($socket,2048);
    ?>
    
    2. Modify the above code to point to your domain and a static file

    3. "php testrange.php"

    You should get a result similar to this:

    [bob@bob ~]# php testrange.php

    HTTP/1.1 206 Partial Content
    Date: Tue, 26 Mar 2013 17:39:30 GMT
    Server: Apache
    Last-Modified: Fri, 08 Feb 2013 07:39:05 GMT
    Accept-Ranges: bytes
    Content-Length: 61
    Content-Range: bytes 60-120/455
    Connection: close
    Content-Type: image/png

    m
     
  8. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Mike,

    Thank you. I found a similar piece of code online and used it to test and it showed Accept-Ranges: none. But yours above shows Accept-Ranges: bytes. So it does appear that we are already supporting Byte Range Requests.

    So I wonder why Apple (and I do hate them and think they are wrong in pushing people to other hosts) reports that Byte-Range Requests are not active when in fact they are?

    Thanks again.


     
  9. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Keep in mind that the results I showed were when querying my own server. I did not query yours. If you queried yours and the server shows Accepted-Ranges: none, then I'd guess your server has something set in the apache configuration to disable it. Just know that isn't how it's configured by default with cPanel.

    I wonder if your host has a new installation template setup that automatically disables ranges in some way, even though there is no problem [that I know of] on current versions of apache.

    I think those kinds of things can be modified via an .htaccess file as well, so be sure you don't have something in an .htaccess file for that particular customer's site that is causing ranges not to be supported.

    Mike

    So I wonder why Apple (and I do hate them and think they are wrong in pushing people to other hosts) reports that Byte-Range Requests are not active when in fact they are?

    Thanks again.[/QUOTE]
     
Loading...

Share This Page