vert-x3 / vertx-stomp

STOMP client/server implementation
Apache License 2.0
31 stars 28 forks source link

content-length: 0 not accepted #84

Open freynder opened 1 year ago

freynder commented 1 year ago

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 commented 1 year ago

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