Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect with Stomp Websocket when custom header #64

Closed
baonguyena1 opened this issue Aug 16, 2019 · 3 comments
Closed

Cannot connect with Stomp Websocket when custom header #64

baonguyena1 opened this issue Aug 16, 2019 · 3 comments
Assignees
Labels

Comments

@baonguyena1
Copy link

Hi Guy,

In the latest version(1.3.6) I see the Library is supporting spring-boot 2.1.x by code:

        if (connectionHeaders == nil) {
        	connectionHeaders = [StompCommands.commandHeaderAcceptVersion:"1.1,1.2"]
        }

But in case I connect with socket with the custom header by function public func openSocketWithURLRequest(request: NSURLRequest, delegate: StompClientLibDelegate, connectionHeaders: [String: String]?). That means the connectionHeaders is not null, so the connectionHeaders cannot add an accepted version by your code. So I think for fix this, you can add accepted version instance of replace connectionHeaders, like

if (connectionHeaders == nil) {
connectionHeaders = [StompCommands.commandHeaderAcceptVersion:"1.1,1.2"]
} else {
connectionHeaders?[StompCommands.commandHeaderAcceptVersion] = "1.1,1.2"
}

@WrathChaos
Copy link
Owner

WrathChaos commented Aug 16, 2019

Hello @baonguyena1,
Can you please open a PR for this fix? :)

@baonguyena1
Copy link
Author

@WrathChaos I will do it.

@WrathChaos
Copy link
Owner

Done with this release : 1.3.5+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants