pkyeck / socket.IO-objc

socket.io v0.7.2 — 0.9.x for iOS and OS X
MIT License
1.97k stars 441 forks source link

Send cookies in websocket. #227

Open freynolds opened 8 years ago

freynolds commented 8 years ago

Hello, I have an issue, my server has a HAProxy loadbalancer and I need to send the cookies in the headers and in the connect. When I add the cookies I can see that the cookies are sent in the request but in socketRocket did connect upgrade, I can see that the cookies in the parameter requestcookies can't be found.

I'm using

    pod 'socket.IO', '0.5.2'
    pod 'SocketRocket', '0.4.2'

My setup is:

    socketIO.cookies = NSHTTPCookieStorage.sharedHTTPCookieStorage().cookiesForURL(NSURL(string: Constants.apiHost)!)
    socketIO.connectToHost(host, onPort: 0, withParams: nil, withNamespace: "NS")

Do you have any idea if I have a bad config or if I should make a PR and add the cookies in the WS request?

My regards. Francisco.

freynolds commented 8 years ago

Bump, any news on this?