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

Avoid sending empty trailer frames for http/2 requests #3758

Closed
shamsimam opened this issue Jun 10, 2019 · 0 comments
Closed

Avoid sending empty trailer frames for http/2 requests #3758

shamsimam opened this issue Jun 10, 2019 · 0 comments

Comments

@shamsimam
Copy link

Setting a Supplier trailer means that, for HTTP/2 requests, an empty trailers frame is sent if the logic determines that there are no trailers to send. This is problematic for gRPC requests because gRPC servers fail whenever they see a trailers frame (even if it is empty) on incoming requests as the gRPC specification says incoming requests do not provide trailers.

https://github.com/eclipse/jetty.project/blob/0e282eece2c32a16b24ca22b994b5327212a7425/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpSenderOverHTTP2.java#L73

https://github.com/eclipse/jetty.project/blob/0e282eece2c32a16b24ca22b994b5327212a7425/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpSenderOverHTTP2.java#L123

Additional discussion on this issue: #3753

sbordet added a commit that referenced this issue Jun 12, 2019
Modified the sender logic to allow specific subclasses to decide
when to send the trailers, if any.
This allows HTTP/2 to correctly compute the end_stream flag and avoid
sending empty trailers frames with end_stream=true.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Jun 12, 2019
Added one more test case and comments about handling of
`content.isConsumed()` in HTTP/2.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Jun 13, 2019
…d_empty_trailers

Issue #3758 - Avoid sending empty trailer frames for http/2 requests.
@sbordet sbordet closed this as completed Jun 16, 2019
@joakime joakime added this to Done in Jetty 9.4.20 Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Jetty 9.4.20
  
Done
Development

No branches or pull requests

3 participants