SUSE / salt-netapi-client

Java bindings for the Salt API
MIT License
85 stars 95 forks source link

Can't open WebSocketEventStream #276

Open asxtray opened 5 years ago

asxtray commented 5 years ago

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

NemanyaM commented 3 years ago

@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.