This closes #76 stomp changes
This commit is contained in:
commit
2e9705cd97
|
@ -491,7 +491,7 @@ public final class StompConnection implements RemotingConnection
|
|||
{
|
||||
//not a supported version!
|
||||
ActiveMQStompException error = BUNDLE.versionNotSupported(acceptVersion);
|
||||
error.addHeader(Stomp.Headers.Error.VERSION, acceptVersion);
|
||||
error.addHeader(Stomp.Headers.Error.VERSION, manager.getSupportedVersionsAsErrorVersion());
|
||||
error.addHeader(Stomp.Headers.CONTENT_TYPE, "text/plain");
|
||||
error.setBody("Supported protocol versions are " + manager.getSupportedVersionsAsString());
|
||||
error.setDisconnect(true);
|
||||
|
|
|
@ -379,7 +379,22 @@ class StompProtocolManager implements ProtocolManager<StompFrameInterceptor>, No
|
|||
|
||||
public String getSupportedVersionsAsString()
|
||||
{
|
||||
return "v" + StompVersions.V1_0 + " v" + StompVersions.V1_1 + " v" + StompVersions.V1_2;
|
||||
String versions = "";
|
||||
for (StompVersions version : StompVersions.values())
|
||||
{
|
||||
versions += " v" + version;
|
||||
}
|
||||
return versions.substring(1);
|
||||
}
|
||||
|
||||
public String getSupportedVersionsAsErrorVersion()
|
||||
{
|
||||
String versions = "";
|
||||
for (StompVersions version : StompVersions.values())
|
||||
{
|
||||
versions += "," + version;
|
||||
}
|
||||
return versions.substring(1);
|
||||
}
|
||||
|
||||
public String getVirtualHostName()
|
||||
|
|
Loading…
Reference in New Issue