Issue description:
Some JSON-RPC requests are being sent over HTTP instead of HTTPS, with HTTPS enabled.
I have HTTPS enabled and it mostly works (I can view my library and such), but throws an error during setup like, “Unable to get Kodi version.” When I dig into the logs, it appears that some (successful) queries are going over HTTPS, while others are failing because they’re attempting HTTP.
Logs:
Successful query example:
2023-10-23 13:46:58.061 Verbose/KodiNexus: --> [381] POST https://osmc.mydomain.dev/jsonrpc (61-byte body)
2023-10-23 13:46:58.061 Verbose/KodiNexus: --> [381] {"id":871,"jsonrpc":"2.0","method":"Player.GetActivePlayers"}
2023-10-23 13:46:58.501 Verbose/KodiNexus: <-- [381] 200 OK https://osmc.mydomain.dev/jsonrpc (441ms, 38-byte body)
2023-10-23 13:46:58.505 Verbose/KodiNexus: <-- [381] {"id":871,"jsonrpc":"2.0","result":[]}
Failed Query Examples:
2023-10-23 13:47:09.438 Verbose/KodiHelix: --> [638] POST http://osmc.mydomain.dev:443/jsonrpc (106-byte body)
2023-10-23 13:47:09.439 Verbose/KodiHelix: --> [638] {"id":773,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["version","name"]}}
2023-10-23 13:47:09.470 Verbose/KodiHelix: <-- [638] HTTP FAILED: java.io.IOException: unexpected end of stream on http://osmc.mydomain.dev:443/...
2023-10-23 13:47:09.475 Error/KodiHelix: Error
java.io.IOException: unexpected end of stream on http://osmc.mydomain.dev:443/...
at hb.h.g(SourceFile:134)
at a2.g.c(SourceFile:5)
at gb.b.a(SourceFile:243)
at gb.f.b(SourceFile:133)
at fb.a.a(SourceFile:102)
at gb.f.b(SourceFile:133)
at db.a.a(SourceFile:151)
at gb.f.b(SourceFile:133)
at gb.a.a(SourceFile:135)
at gb.f.b(SourceFile:133)
at gb.g.a(SourceFile:141)
at gb.f.b(SourceFile:133)
at q3.d.a(SourceFile:129)
at gb.f.b(SourceFile:133)
at cf.e.a(SourceFile:81)
at gb.f.b(SourceFile:133)
at q3.c.a(SourceFile:419)
at gb.f.b(SourceFile:133)
at le.b.a(SourceFile:3)
at gb.f.b(SourceFile:133)
at fb.i.h(SourceFile:96)
at fb.f.run(SourceFile:36)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at nb.r.e0(SourceFile:158)
at hb.h.g(SourceFile:39)
... 24 more
2023-10-23 13:47:09.439 Verbose/KodiHelix: --> [592] POST http://osmc.mydomain.dev:443/jsonrpc (53-byte body)
2023-10-23 13:47:09.439 Verbose/KodiHelix: --> [592] {"id":440,"jsonrpc":"2.0","method":"JSONRPC.Version"}
2023-10-23 13:47:09.472 Verbose/KodiHelix: <-- [592] HTTP FAILED: java.io.IOException: unexpected end of stream on http://osmc.mydomain.dev:443/...
2023-10-23 13:47:09.479 Verbose/KodiHelix: --> [560] POST http://osmc.mydomain.dev:443/jsonrpc (106-byte body)
2023-10-23 13:47:09.479 Verbose/KodiHelix: --> [560] {"id":658,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["version","name"]}}
2023-10-23 13:47:09.501 Verbose/KodiHelix: <-- [560] HTTP FAILED: java.io.IOException: unexpected end of stream on http://osmc.mydomain.dev:443/...
I would love to see the scheme consistently applied so it doesn’t throw errors.