Use correct header for version in CONNECTED frame
Previously, the negotiated version was included in the CONNECTED frame using the accept-version header. This is incorrect. The version header should be used.
This commit is contained in:
committed by
Rossen Stoyanchev
parent
20c4177466
commit
364bc35709
@@ -185,10 +185,10 @@ public class StompProtocolHandler implements SubProtocolHandler {
|
||||
|
||||
Set<String> acceptVersions = connectHeaders.getAcceptVersion();
|
||||
if (acceptVersions.contains("1.2")) {
|
||||
connectedHeaders.setAcceptVersion("1.2");
|
||||
connectedHeaders.setVersion("1.2");
|
||||
}
|
||||
else if (acceptVersions.contains("1.1")) {
|
||||
connectedHeaders.setAcceptVersion("1.1");
|
||||
connectedHeaders.setVersion("1.1");
|
||||
}
|
||||
else if (acceptVersions.isEmpty()) {
|
||||
// 1.0
|
||||
|
||||
Reference in New Issue
Block a user