Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Apache Byte-Range Request Compatibility Tests Provide Inconsistent Results

Discussion in 'General Discussion' started by dswimr615, Dec 28, 2017.

Tags:
  1. dswimr615

    dswimr615 Member

    Joined:
    Jan 9, 2014
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    A client of ours is trying to get their site compatible (Site #1) to byte-range requests as Apple requires it for some of its software. When performing the following test on their website:

    curl -H Range:bytes=16- -I domain.org

    We get the following:

    HTTP/1.1 200 OK
    Date: Thu, 28 Dec 2017 20:10:10 GMT
    Server: Apache
    X-Powered-By: PHP/5.3.29
    Content-Type: text/html

    As you can see, a 200 request is being returned when a 206 Partial Content is expected (and is what we want). On Site #2 located on the same server with the same VirtualHost content and no .htaccess or php.ini or CageFS differences, we get the following with the same test:

    HTTP/1.1 206 Partial Content
    Date: Thu, 28 Dec 2017 19:49:57 GMT
    Server: Apache
    Last-Modified: Wed, 20 Mar 2013 21:12:28 GMT
    Accept-Ranges: bytes
    Content-Length: 10881
    Content-Range: bytes 16-10896/10897
    Content-Type: text/html

    The above is what we want with Site #1. What is the variable that needs to be changed?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,852
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Are you running the cURL command from the cPanel server's command line? If so, verify the cPanel server is routing the website to the correct IP address. For instance, if you temporarily add an "IP domain.org" entry in the /etc/hosts file, do you see the same results?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dswimr615

    dswimr615 Member

    Joined:
    Jan 9, 2014
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hey Michael,

    That's not far off from what I expected, as the problem site does indeed have a dedicated IP (but other sites with a dedi IP work properly with this test). I added a hosts entry for the website, however, as well as ran the curl command from the server the site is on but still no luck.

    HTTP/1.1 200 OK
    Date: Fri, 29 Dec 2017 16:39:23 GMT
    Server: Apache
    X-Powered-By: PHP/5.3.29
    Content-Type: text/html

    I just checked something and it appears to be consistent-- could the issue possibly be the TLD? I'm going through testing sites that don't end in .com, and all of them are returning similar incorrect results as above.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,852
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look and rule out any server configuration issues?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice