Accept Incorrectly Capitalized Content-Range Headers
Some external podcast urls return a valid CDN response, which is not accepted due to the "Content-Range" header being all lowercase as "content-range". This tries the lowercase version of the header as a backup if no Content-Range header is found initially.
This commit is contained in:
@@ -578,6 +578,8 @@ class CdnManager:
|
||||
response = self.request(range_start=0,
|
||||
range_end=ChannelManager.chunk_size - 1)
|
||||
content_range = response.headers.get("Content-Range")
|
||||
if content_range is None:
|
||||
content_range = response.headers.get("content-range")
|
||||
if content_range is None:
|
||||
raise IOError("Missing Content-Range header!")
|
||||
split = content_range.split("/")
|
||||
|
||||
Reference in New Issue
Block a user