Header values are optional in Stomp 1.1 and 1.2
This commit is contained in:
committed by
Rossen Stoyanchev
parent
c41779f895
commit
11824893a9
@@ -215,10 +215,10 @@ public class StompDecoder {
|
||||
if (headerStream.size() > 0) {
|
||||
String header = new String(headerStream.toByteArray(), UTF8_CHARSET);
|
||||
int colonIndex = header.indexOf(':');
|
||||
if (colonIndex <= 0 || colonIndex == header.length() - 1) {
|
||||
if (buffer.remaining() > 0) {
|
||||
if (colonIndex <= 0) {
|
||||
if(buffer.remaining() > 0) {
|
||||
throw new StompConversionException("Illegal header: '" + header +
|
||||
"'. A header must be of the form <name>:<value>.");
|
||||
"'. A header must be of the form <name>:[<value>].");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user