Skip to content

Force chunked transfer encoding to work around net-http bug - #90

Merged
nmburgan merged 1 commit into
mainfrom
fix-tls13-newsessionticket-hang
May 13, 2026
Merged

Force chunked transfer encoding to work around net-http bug#90
nmburgan merged 1 commit into
mainfrom
fix-tls13-newsessionticket-hang

Conversation

@nmburgan

@nmburgan nmburgan commented May 13, 2026

Copy link
Copy Markdown
Member

In ring-core 1.15.x, strings are written directly to the underlying stream and the stream is closed without flushing, which lets Jetty use Content-Length framing. With TLS 1.3, a NewSessionTicket may be sent immediately after the response data. Ruby's net-http sees the pending TLS record and blocks on a keep-alive check until timeout. Chunked encoding avoids this because the ticket is consumed during body reading rather than lingering in the TCP buffer.

See OpenVoxProject/openvox-server#197 for more details.

A fix in net-http is ruby/ruby#6423 but even if that gets merged into the version of Ruby we use in OpenVox, older agents will be vulnerable to this issue.

Checklist

I have:

@bastelfreak

Copy link
Copy Markdown
Contributor

oh nice!

@nmburgan

nmburgan commented May 13, 2026

Copy link
Copy Markdown
Member Author

I made a test openvox-server build with this change and verified it fixes the issue.

In ring-core 1.15.x, strings are written directly to the underlying stream and the stream is closed without flushing, which lets Jetty use Content-Length framing. With TLS 1.3, a NewSessionTicket may be sent immediately after the response data. Ruby's net-http sees the pending TLS record and blocks on a keep-alive check until timeout. Chunked encoding avoids this because the ticket is consumed during body reading rather than lingering in the TCP buffer.

See OpenVoxProject/openvox-server#197 for more details.

A fix in net-http is ruby/ruby#6423 but even if that gets merged into the version of Ruby we use in OpenVox, older agents will be vulnerable to this issue.

Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@austb austb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🦆 :insert-missing-tape-emoji-here:

PR looks fine, one comment on the comment possibly

Comment thread src/puppetlabs/trapperkeeper/services/webserver/jetty_core.clj Outdated
@nmburgan
nmburgan force-pushed the fix-tls13-newsessionticket-hang branch from 6d752f3 to cc70af6 Compare May 13, 2026 21:58
@nmburgan
nmburgan merged commit 9f5bbe8 into main May 13, 2026
11 of 13 checks passed
@nmburgan
nmburgan deleted the fix-tls13-newsessionticket-hang branch May 13, 2026 22:17
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

Successfully merging this pull request may close these issues.

3 participants