New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing protocol in redir 302 #523
missing protocol in redir 302 #523
Conversation
Slim/Formats/RemoteStream.pm
Outdated
@@ -193,6 +193,8 @@ sub request { | |||
# socket in a CLOSE_WAIT state and leaking. | |||
$self->close(); | |||
|
|||
# some 302 services omit the protocol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to have support for other protocols like rtmp(?) - which would be broken by this change. Please make sure you only modify the $redir
if there's no protocol defined, no matter whether it's http(s) or something else. Even if you need three lines to make it human readable 😁 . Maybe verify there's no ://
in there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep you're right ... I'll do that tomorrow then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, can you have redir (3xx) on protocols other than HTTP(S)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can certainly have redirects to other protocols. And that's what we try to fix here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood - see new fix proposal (still one line though :-))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least you left a comment in there to explain what that line does 😂 . Thanks!
argh ... I just saw that there is an issue with redirect in direct stream when protocol is missing as well... working on it! |
Fixes https://forums.slimdevices.com/showthread.php?113748-NPR-Hourly-News-Podcast-HTTP-1-1-400-BAD-REQUEST-Can-t-Play&p=1006501&viewfull=1#post1006501