Repository navigation
Conversation
### Motivation The HTTP/1.0 parser and response renderer are tested separately, but neither test shows that a direct connection negotiated for keep-alive can deliver a second request after a complete first response. ### Modification Render two ordinary HTTP/1.0 GET requests with the existing typed keep-alive option. On a single native server flow, fully consume a length-delimited 200 response for the first request before sending the second. Verify both requests reach the server and both responses keep their status, connection option and body. ### Result Cover direct HTTP/1.0 keep-alive reuse without changing default persistence, proxy policy, or production code. ### Tests JDK 17; focused HttpServerSpec passed on Scala 2.13.18 and 3.3.9 (1/1 each). Scoped test Scalafmt and license-header checks passed. ### References - [RFC 9112 §9.3](https://www.rfc-editor.org/rfc/rfc9112.html#section-9.3) - [RFC 9112 Appendix C.2.2](https://www.rfc-editor.org/rfc/rfc9112.html#appendix-C.2.2)
pjfanning
reviewed
Nov 26, 2026
pjfanning
left a comment
Member
There was a problem hiding this comment.
Nit: building the raw request via the client's HttpRequestRendererFactory.renderStrict couples the server test to the client renderer and hides the wire bytes. A send("""GET /first HTTP/1.0 ...""") literal like the neighbouring tests would be simpler and clearer, and drop two imports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The HTTP/1.0 parser and response renderer are tested separately, but neither test shows that a direct connection negotiated for keep-alive can deliver a second request after a complete first response.
Modification
Render two ordinary HTTP/1.0 GET requests with the existing typed keep-alive option. On a single native server flow, fully consume a length-delimited 200 response for the first request before sending the second. Verify both requests reach the server and both responses keep their status, connection option and body.
Result
Cover direct HTTP/1.0 keep-alive reuse without changing default persistence, proxy policy, or production code.
Tests
JDK 17; focused HttpServerSpec passed on Scala 2.13.18 and 3.3.9 (1/1 each). Scoped test Scalafmt and license-header checks passed.
References