WebSocket component: to make it more complient with rfc6455
Recently I played with https://www.nativescript.org development.
I used https://github.com/NathanaelA/nativescript-websockets lib to connect to Tigase but unfortunately spent almost one day to figure out why it was not working (was not able to even open WS connection)
Then after some deep debugging I realized that this lib sends the Connection: upgrade header when handshake. But Tigase expects it as Connection: Upgrade here https://tigase.tech/projects/tigase-server/repository/revisions/master/entry/server/src/main/java/tigase/server/websocket/WebSocketXMPPIOService.java#L367
I tried to modify the nativescript-websockets lib but then realized it uses another lib inside to cope with WS - PocketSocket and it's actually it sets this header in lower case format: https://github.com/zwopple/PocketSocket/blob/master/PocketSocket/PSWebSocketDriver.m#L220
My first thought was that it's a bug with the PocketSocket lib.
But then I investigated the rfc6455 and found the following rule in 4.2.1 section:
- A |Connection| header field that includes the token "Upgrade",
treated as an ASCII case-insensitive value.
So it seems that clients can send this header in any format: Upgrade or upgrade.
Are you able to modify Tigase code a little bit and make it more complient with the spec?