salt-netapi-client icon indicating copy to clipboard operation
salt-netapi-client copied to clipboard

Can't open WebSocketEventStream

Open asxtray opened this issue 5 years ago • 1 comments

it seems that WebSocketEventStream can only work with insecure http sockets. Please have a look at line 46: URI adjustedURI = (new URI(uri.getScheme() == "https" ? "wss" : "ws", uri.getSchemeSpecificPart(), uri.getFragment())).resolve("ws/" + token.getToken()); Despite the provided uri schema is HTTPS it fails direct comparison as it's String object reference

asxtray avatar Jun 24 '19 09:06 asxtray

@asxtray Actually, seems that there is no HTTPS implementation at all, as I could see, in this part of a project, if I am right by any chance, the ternary condition could be removed. Also, maybe constants could be introduced for better readability and as a good practice.

NemanyaM avatar Mar 29 '21 20:03 NemanyaM