Atmosphere / nettosphere

A Java WebSocket/HTTP server based on the Atmosphere and Netty Framework
http://async-io.org/
321 stars 81 forks source link

request.body().asBytes() always returns null #126

Closed supertick closed 6 years ago

supertick commented 7 years ago

Not sure if its a bug or by design or fixed in newer release but the following "always" returns null regardless of the data posted

public void handle(AtmosphereResource r) { byte[] data = r.getRequest().body().asBytes(); while r.getRequest().body().asString() returns data as expected.

I thought they might point to the same buffer, but perhaps not ?

Nettosphere 2.3.0

Thanks for such a great project ! Cheeers, Greg

jfarcand commented 7 years ago

@supertick Can you share a simple test case as a pull request (quite busy those days). Will look asap.

jfarcand commented 7 years ago

@supertick Try with the latest snapshot