Skip to content

Spring Websocket - JettyWebsocketHandlerAdapter copyByteBuffer fills Buffer with zeros #31857

@forsti0506

Description

@forsti0506

Hi Team,

Short Question from my side regarding

In the last change the initialization of the ByteBuffer changed from using the limit (Standard BinaryMessage Constructor using limit) to using the max capacity which leads to a buffer which is filled up with zeros until his capacity is reached (ed172d6#diff-43448f6e16d92d0df476c611919c95839ad9f2874d149cf939d8f91a2824b5f3)

Is there any reason to do that and not changing the mentioned Line 121 to using limit again? In our case that leads to some troubles with protobuf from google which expects that a buffer ends with exact 1 "0"!

Thanks a lot for a discussion in advance!

Best regards,

Martin

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions