vertx-stomp icon indicating copy to clipboard operation
vertx-stomp copied to clipboard

content-length: 0 not accepted

Open freynder opened this issue 3 years ago • 1 comments

Hi,

I'm testing a few payloads with krossbow STOMP client, and received an error on a SUBSCRIBE frame with content-length: 0 header:

13:03:45 [vert.x-eventloop-thread-1] ERROR io.vertx.core.impl.ContextBase - Unhandled exception 
java.lang.IllegalArgumentException: Size must be > 0
	at io.vertx.core.impl.Arguments.require(Arguments.java:29)
	at io.vertx.core.parsetools.impl.RecordParserImpl.fixedSizeMode(RecordParserImpl.java:156)
	at io.vertx.ext.stomp.impl.FrameParser.handleLine(FrameParser.java:113)
	at io.vertx.core.parsetools.impl.RecordParserImpl.handleParsing(RecordParserImpl.java:214)

The STOMP specification does not prohibit 0 values as far as I can see, so would be good to not enforce it. (Note that the same client was previously used with a Spring Boot implementation with no issue).

Thanks

freynder avatar Apr 10 '23 11:04 freynder

https://github.com/vert-x3/vertx-stomp/pull/86 includes a fix for this.

freynder avatar Apr 12 '23 09:04 freynder