Skip to content

Enhance Stomp support to handle frames with NULL octets in the body [SPR-10818] #15444

@spring-projects-issues

Description

@spring-projects-issues

Andy Wilkinson opened SPR-10818 and commented

The STOMP spec states:

All frames MAY include a content-length header. This header is an octet count for the length of the message body. If a content-length header is included, this number of octets MUST be read, regardless of whether or not there are NULL octets in the body. The frame still needs to be terminated with a NULL octet.

We currently use a NULL octet as a delimiter irrespective of any content-length header. Supporting frames that contain NULL octets in the body would require us to stop using Reactor's DelimitedCodec in the broker relay and implement something smarter, presumably based on Gary Russell's existing converter code.

The problem at the moment is that messages are truncated, e.g. sending "Message containing \0 (ASCII null)" results in "Message containing " being received.


Referenced from: commits a489c2c

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions