Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sending WebSocket frames modifies the payload ByteBuffer #4341

Closed
lachlan-roberts opened this issue Nov 21, 2019 · 2 comments
Closed

sending WebSocket frames modifies the payload ByteBuffer #4341

lachlan-roberts opened this issue Nov 21, 2019 · 2 comments
Assignees

Comments

@lachlan-roberts
Copy link
Contributor

Jetty version
9.4.x and 10.0.x

Description
Sending a WebSocket message/frame using a ByteBuffer will modify the original buffer and change the position. After a send operation the buffer should remain unmodified.

@lachlan-roberts lachlan-roberts self-assigned this Nov 21, 2019
lachlan-roberts added a commit that referenced this issue Nov 26, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Nov 26, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Nov 26, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Nov 26, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Nov 26, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Nov 26, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@lachlan-roberts
Copy link
Contributor Author

@gregw do you think this is something I should fix in Jetty 9.4 as well?

@gregw
Copy link
Contributor

gregw commented Nov 28, 2019

No.

lachlan-roberts added a commit that referenced this issue Nov 28, 2019
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
lachlan-roberts added a commit that referenced this issue Nov 28, 2019
…es (#4359)

- test that Frame buffer is unchanged after sending
- Generator and FrameFlusher no longer modify frame payload
- permessage-deflate no longer modify frame payload
- remove Buffer allocation from Generator
- outgoing autoFragment no longer modifies buffer
- minor cleanups and optimizations from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants