Skip to content
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

input.https invalid URL #593

Closed
leonekmi opened this issue Aug 7, 2018 · 7 comments
Closed

input.https invalid URL #593

leonekmi opened this issue Aug 7, 2018 · 7 comments

Comments

@leonekmi
Copy link

leonekmi commented Aug 7, 2018

#!/usr/bin/liquidsoap

set("log.file.path","/opt/radio/basic-radio.log")

music = playlist(mode="randomize", reload=1, reload_mode="rounds",  "/opt/radio/music")
music = smart_crossfade(music)
jingles = playlist(mode="random", reload=10, reload_mode="seconds",  "/opt/radio/jingles")
error = single("/opt/radio/error.ogg")

radio = music

radio = random([jingles, radio])

radio = fallback(track_sensitive = false, [input.https("https://icecast.mysrv.com/live.ogg"), radio, error])

output.icecast(%vorbis,
  host = "localhost", port = 8524,
  password = "***********", mount = "radio.ogg",
  radio)

I can't understand why liquidsoap crashes with "Invalid value at line 15, char 56-89: invalid URL.".

Liquidsoap version : 1.3.3
Debian 9

@leonekmi
Copy link
Author

leonekmi commented Aug 7, 2018

maybe linked to #546

@toots
Copy link
Member

toots commented Aug 15, 2018

You need to enable SSL support for https to work. If installing via opam just do:

opam install ssl

Alternatively on OSX:

opam install osx-secure-transport

@toots toots closed this as completed Aug 15, 2018
@leonekmi
Copy link
Author

It's installed, the regex was the problem (no https support), i fixed that.

@toots
Copy link
Member

toots commented Aug 15, 2018

Ok, thanks. Anything that we should fix on our end?

@leonekmi
Copy link
Author

http_source.ml line 147 url regex,
\\([Hh][Tt][Tt][Pp]\|[Hh][Tt][Tt][Pp][Ss]\\)

        (Str.matched_group 2 url),
        (try Str.matched_group 3 url with Not_found -> "/")

This is my fix, it was found in emergency for my radio, i think that can be better, compact.

@toots toots reopened this Aug 15, 2018
@toots toots closed this as completed in 00dfcd6 Aug 15, 2018
@toots
Copy link
Member

toots commented Aug 15, 2018

Thanks. No idea how this slept through the cracks..

@add-n2x
Copy link

add-n2x commented May 8, 2020

I have the same issue (Liquidsoap 1.4.1-2).

Connecting with telnet: telnet 127.0.0.1 1234

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
in_http_1.url https://securestream.o94.at/live.mp3
Invalid URL
END

While an HTTP Stream works fine:

in_http_1.url http://chill.out.airtime.pro:8000/chill_a

opam install ssl is installed.

Update: There seems to be a "input.https" alternative to "input.http" when defining the input sources. But this triggers an Liquidsoap error Connecting to <https://securestream.o94.at:80/live.mp3>... 2020/05/08 [in_http_1:4] Connection failed: SSL connection() error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number

Update 2: For anyone coming across this issues, there was a bug in Liquidsoap 1.4.1. This is fixed in 1.4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants