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

Fix HTTP2Test.testLargeRequestHeaders #12536

Conversation

lorban
Copy link
Contributor

@lorban lorban commented Nov 14, 2024

Make sure ReadOnlyBufferException is not thrown from read-only methods of RetainableByteBuffer.Mutable.Wrapper, even when the buffer is retained.

This fixes such failures: https://jenkins.webtide.net/blue/organizations/jenkins/jetty.project/detail/jetty-12.1.x-ee9-ResponseTest/1/tests/

@lorban lorban added the Bug For general bugs on Jetty side label Nov 14, 2024
@lorban lorban self-assigned this Nov 14, 2024
…buffer is retained

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
@lorban lorban force-pushed the fix/jetty-12.1.x/fix-ReadOnlyBufferException-in-Mutable-Wrapper branch from 22b47bc to b9aa2bb Compare November 14, 2024 11:01
Copy link
Contributor

@sbordet sbordet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both isFull() and space() can be lifted into the non-mutable interface RetainableByteBuffer, since they are implemented in terms of methods that exist there.

They are getter methods only that do not mutate.

By doing that, you can call these methods without the need to be mutable, and this problem would go away.

@joakime
Copy link
Contributor

joakime commented Nov 14, 2024

I'd like to see this fixed/merged soon, as it is breaking other 12.1.x PRs

https://jenkins.webtide.net/blue/organizations/jenkins/jetty.project/detail/PR-12531/5/tests

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
@lorban lorban requested a review from sbordet November 15, 2024 09:13
@lorban lorban merged commit 350944b into jetty-12.1.x Nov 15, 2024
2 of 4 checks passed
@lorban lorban deleted the fix/jetty-12.1.x/fix-ReadOnlyBufferException-in-Mutable-Wrapper branch November 15, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants