jetty / jetty/jetty.project

Review HttpReceiverOverHTTP network buffer management

Open
#12,934 3 comments 0 reactions 1 assignee Claimed by @sbordet View on GitHub
Enhancement
Dominant language
Java
Stars
4.1k
Forks
2k
Avg merge
3d 56m
Merged PRs (30d)
48

Description

**Jetty version(s)**
12.1.x

**Enhancement Description**
`HttpReceiverOverHTTP` should manage the network buffer in a more robust and simple way.

HTTP/1.1 parsing needs to be reluctant (as opposed to HTTP/2 greedy) because of backpressure in case of content and because there can be multiple 1xx responses in the same buffer.

This means that the network buffer must remain around.

However, if the application is not reading, an asynchronous failure must be able to release the network buffer (e.g. from `HttpConnectionOverHTTP.close()`).

This means that the network buffer could be accessed concurrently from the fill+parse loop and the asynchronous failure.

Explore a solution based on a state machine.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.