If you use the popular node-http-proxy (https://github.com/http-party/node-http-proxy)
to proxy a websocket connection, then all the headers that it gives back to connected clients are in lower-case.
I noticed that this library explicitly expects and checks for: 'Upgrade', 'Connection' and 'Sec-WebSocket-Accept'.
While a webserver might also send those out in lowercase: 'upgrade', 'connection' and 'sec-websocket-accept'.
Possibility that other proxy server might do the same thing, and only send out lowercase headers.
I downloaded your library and added the fix to check for both variants.
See below. Wanted to contribute back, even though I don't have time to do a pull request right now.
Hope it can be merged / help others out as well.
Other than that, great library that's very easy to use and better than most libraries out there! ^_^
Thumbs up :)
See the attachment for the (edited) lines only.
part.txt
If you use the popular node-http-proxy (https://github.com/http-party/node-http-proxy) to proxy a websocket connection, then all the headers that it gives back to connected clients are in lower-case. I noticed that this library explicitly expects and checks for: 'Upgrade', 'Connection' and 'Sec-WebSocket-Accept'. While a webserver might also send those out in lowercase: 'upgrade', 'connection' and 'sec-websocket-accept'. Possibility that other proxy server might do the same thing, and only send out lowercase headers.
I downloaded your library and added the fix to check for both variants. See below. Wanted to contribute back, even though I don't have time to do a pull request right now. Hope it can be merged / help others out as well.
Other than that, great library that's very easy to use and better than most libraries out there! ^_^ Thumbs up :)
See the attachment for the (edited) lines only. part.txt
Starts at line 915: https://github.com/gusavila92/java-android-websocket-client/blob/master/src/main/java/dev/gustavoavila/websocketclient/WebSocketClient.java#L915