Validate if STOMP frame is allowed to have a body

Issue: SPR-10890
This commit is contained in:
Rossen Stoyanchev
2013-10-14 21:37:44 -04:00
parent 7c3749769a
commit 57d127b55a
5 changed files with 40 additions and 24 deletions

View File

@@ -133,6 +133,11 @@ public class StompCodecTests {
assertEquals("alpha:bravo\r\n\\", headers.getFirstNativeHeader("a:\r\n\\b"));
}
@Test(expected=StompConversionException.class)
public void decodeFrameBodyNotAllowed() {
decode("CONNECT\naccept-version:1.2\n\nThe body of the message\0");
}
@Test
public void decodeMultipleFramesFromSameBuffer() {
String frame1 = "SEND\ndestination:test\n\nThe body of the message\0";