Socket.IO-Client-Swift
Socket.IO-Client-Swift copied to clipboard
Wrong URL escaping for connectParams
Since commit https://github.com/nuclearace/Socket.IO-Client-Swift/commit/b67b6abbdfaa87abcf86ae7ec72da0f951e73b7a connectParams passed to SocketIOClient
init escaped in a wrong way.
For example, I pass a dictionary with “session_id” parameter which may look as hGx+u1d/ozkpZ5gQ==
.
On the server side Socket.IO library reads this parameter with space instead of “+” character.
I think that the reason for this is the way NSURLComponents
URL encode works.
This is a method which causes a problem: https://github.com/nuclearace/Socket.IO-Client-Swift/blob/master/Source/SocketEngine.swift#L227