Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
apollo-99-trunk-20120827.204756-104
Description
When retrieving over TCP a STOMP frame sent by UDP, Apollo sends spurious bytes, violating the STOMP protocol.
Here is the tcpdump capture of what has been sent to Apollo:
0x0010: 808e 126c 8b2e eec3 004b 4600 5345 4e44 ...l.....KF.SEND
0x0020: 0a6c 6f67 696e 3a67 7565 7374 0a70 6173 .login:guest.pas
0x0030: 7363 6f64 653a 6775 6573 740a 6465 7374 scode:guest.dest
0x0040: 696e 6174 696f 6e3a 2f71 7565 7565 2f74 ination:/queue/t
0x0050: 6573 7434 7564 700a 0a68 656c 6c6f 00 est4udp..hello.
This is a small frame with "hello" as body, properly ended by the NULL byte.
When subscribed to the queue, the consumer receives from Apollo:
0x0030: a45e dbd6 4d45 5353 4147 450a 7375 6273 .^..MESSAGE.subs
0x0040: 6372 6970 7469 6f6e 3a61 3430 6162 3130 cription:a40ab10
0x0050: 2d35 3033 6336 3437 632d 3465 3065 2d33 -503c647c-4e0e-3
0x0060: 3166 352d 320a 7365 6e64 6572 2d6c 6f67 1f5-2.sender-log
0x0070: 696e 3a67 7565 7374 0a73 656e 6465 722d in:guest.sender-
0x0080: 6970 3a0a 7469 6d65 7374 616d 703a 3133 ip:.timestamp:13
0x0090: 3436 3133 3531 3638 3134 310a 6d65 7373 46135168141.mess
0x00a0: 6167 652d 6964 3a61 706f 6c6c 6f2d 3131 age-id:apollo-11
0x00b0: 310a 6465 7374 696e 6174 696f 6e3a 2f71 1.destination:/q
0x00c0: 7565 7565 2f74 6573 7434 7564 700a 0a68 ueue/test4udp..h
0x00d0: 656c 6c6f 0000 0a ello...
The "hello" body is now followed by one more NULL and a NL.
The NL is just noise that can be ignored but the extra NULL is not allowed by the spec.