forked from owncloud/music
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some radio stations not playing with the relaying
The problem was how we handled the HTTP headers in case the original stream URL redirected the connection to another URL. And specifically, if the redirection response returned the Content-Length header with value 0 and the final URL didn't have this header (as is typical for live streams). In that case, the 0-length was erroneously returned to the client as the length of the stream. The problem originated from how the "associative" mode of the PHP built-in function get_headers works. It makes it basically impossible to know for certain, which headers come from the final URL and which ones from the intermediate redirection response(s). To work around this, we now use the function in non-associative mode and parse the result to a dictionary with our own logic. refs owncloud#1194
- Loading branch information
Showing
2 changed files
with
24 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters