Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can i enable byte range request? While pod casting on itunes it gives an error message "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.".
Please give me a method to enable byte range request

share|improve this question

2 Answers 2

Apache handles it out of the box for static content. If the content is being generated by PHP then you'll need to amend your PHP code accordingly.

Supposedly the http_send_file() and http_send_data() functions handle range requests - but I'm not sure what that means in practice - some experimentation required.

share|improve this answer
    
i want to submit an rss to itunes, While submitting pod casting it gives the above error. How can i check byte-range request is enabled or not?, if not enabled how can i enable? –  praji Jun 14 '12 at 10:50
    
It will be enabled if you write your PHP code to enable it –  symcbean Jun 14 '12 at 14:59

Apache supports the Byte-Range request out of the box - assuming it's not been explicitly disabled to get around this DoS bug (http://httpd.apache.org/security/CVE-2011-3192).

You can test with something trivial like the following (in PHP) :

<?php
$range = '60-120';
$host = "my.domain.name";
$socket = fsockopen($host,80);
$packet = "GET /path/to/static/file.xml 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);

Running the above, should result in something like the following :

HTTP/1.1 206 Partial Content
Date: Tue, 10 Jul 2012 11:17:55 GMT
Server: Apache
Last-Modified: Tue, 10 Jul 2012 10:12:23 GMT
Accept-Ranges: bytes
Content-Length: 61
Content-Range: bytes 60-120/6433
Connection: close
Content-Type: text/xml

tp://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<ch

If the above doesn't work, then it's likely someone's turned off the Range header - see the above URL for suggestions of what to look for in either .htaccess files or the global Apache configuration.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.