0

I use Libsyn for several podcasts, and this is a new issue that I've never had before. I publish my own RSS feed, and redirect the audio file requests through my own server so I can do my own logging. iTunes is rejecting my submission of the feed with the message "There is a problem with your feed. Your episode are hosted on a server which doesn't support byte-range requests. Enable byte-range requests and try your submission again."

Obviously, Libsyn DOES support byte-range requests, so the problem appears to be in the way I'm redirecting the requests. This is what has always worked on my existing podcasts:

$id = 12345; // (the episode number)
$url = 'http://traffic.libsyn.com/myshow/myfile-'.$id.'.mp3';
header("Location: $url");

So I've tried adding some headers to convince iTunes that I actually do support byte-range requests. I've tried just about every combination of these that I can think of:

$id = 12345; // (the episode number)
$filesize = 12345678; // (the size of my file on Libsyn)
$url = 'http://traffic.libsyn.com/myshow/myfile-'.$id.'.mp3';
header('HTTP/1.1 206 Partial Content');
header('Content-Type: audio/x-mp3');
header('Accept-Ranges: bytes');
header("Content-Length: $filesize");
header("Location: $url");

I still get the error trying to submit the show to iTunes, and am out of ideas. Any suggestions?

CaymanCarver
  • 389
  • 3
  • 14

2 Answers2

1

You can't return make a single HTTP response be both a success (206) and a redirect (Location header, implying a 30x). You'll need to either serve the content yourself, or give up on logging.

  • I found the problem, and it was not what I thought. The redirecting works fine, but I had a typo and was looking for the files from the wrong domain name. – CaymanCarver Dec 03 '12 at 00:03
  • Oh... hm, that's true, I suppose the range request would just work on the target host. But you should still remove all the headers other than `Location` from your response, as they're all meaningless on a redirect. –  Dec 03 '12 at 00:04
1

I encourage the many others who have posted about this question to look for unrelated typos and something silly like my problem was. The error returned by iTunes does not necessarily mean what it says.

CaymanCarver
  • 389
  • 3
  • 14