Some podcast aggregators show ccdn.php as file name #321
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Some podcast aggregators show ccdn.php as file name instead of file extensions like .mp3 or .ogg
The following were tested:
Newsboat
Clementine
Strawberry
This test was in response to comment #6 on HPR4521
https://hackerpublicradio.org/eps/hpr4424/index.html#comment_4521
I looked at this issue because it interested me, and I had fallen into it years ago. I thought I'd write about my experience in case it might be of interest. There may be much better solutions to this problem of course :-)
I tripped over this because I modified the venerable
Bashpodderscript many years ago to act as my personal podcatcher. It suffered from whatarcher72is referencing in this issue. It used the approach of assuming the enclosure URL contained the target filename (which it very often did in the early days of RSS and podcasting). It fell over badly when it encountered issues like this.This implies that the parsing of the enclosure URL to find the target filename is no longer a reliable algorithm (and hasn't been for some time).
A better way of doing this would seem to be to use the HTTP
Content-Dispositionheader (if there is one of course). I tried a simple experiment as follows, using the--content-dispositionoption ofwget:The query is redirected several times to get the file, and apparently one of the servers in the chain has provided a
Content-Dispositionheader that has allowedwgetto generate the correct filename.Without the
--content-dispositionoption I received the file:So it seems that some step has given the necessary clue, rather than the final URL being parsed to get the filename.
Obviously the failing podcatchers are unlikely to be able to use this type of approach without a redesign. Although I have no expertise in this area I wonder if an alternative URL format in the feed would help.
Could a REST-like interface be used with URLs such as:
The code behind this URL could determine that it's an episode download being requested by the
epspart, then know it's episode4525, and the audio filehpr4525.mp3. Another URL could then be redirected to an URL of the format that's currently being used, and the chain of content delivery could follow. The point of doing this would be to give a simplified URL to the podcatcher which it is able to parse to get the filename.It's just a suggestion, and, if it even worked, would require feeds to be remodelled, which might lead to chaos.
I think we can fix this on the apache side. Thanks both @archer72 and @davmo for the help in debugging this.
In theory the podcatchers should not download it again as the
guiddid not change, but most likely they will. Not a big deal for the regular 10 day feed but might be an issue for the full feed.An episode Zero on the full feed with a warning may be the way to go to alert people to the issue.
I'll do some investigation.
Solution was to add a Content-Disposition Header in the ccdn.php