WrathChaos / StompClientLib

Simple STOMP Client library, Swift 3 and 4, 4.2, 5 compatible
https://www.freakycoder.com
MIT License
154 stars 81 forks source link

Issue with Cookies in header #71

Closed cedb777 closed 4 years ago

cedb777 commented 5 years ago

I tried to send a cookie to authenticate to the server but nothing has been sent. When i read the log on server side, the header does not contain the cookie. Here is my code what i do

    let cookieHeader = HTTPCookie.requestHeaderFields(with: self.cookies)
    socketClient.openSocketWithURLRequest(request: NSURLRequest(url: url as URL) , delegate: self, connectionHeaders:cookieHeader)

Is it possible to open socket with a cookie which is used to authenticate? Thank you for your help!

WrathChaos commented 5 years ago

I need to research about it. I will work on it :)

cedb777 commented 5 years ago

Thank you!

WrathChaos commented 5 years ago

Hey @cedb777, Really sorry but I had no time for the research, I'm gonna research about it in this weekend. Just to let you know

cedb777 commented 5 years ago

Hey,

I have a temporary solution. I have modified SRWebSocket.m (SocketRocket library) and I force to send the cookies if needed.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.