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

[HTTP2] bodyToMono waiting for data frame indefinitely #865

Closed
Tiller opened this issue Oct 10, 2019 · 0 comments
Closed

[HTTP2] bodyToMono waiting for data frame indefinitely #865

Tiller opened this issue Oct 10, 2019 · 0 comments
Labels
type/bug A general bug

Comments

@Tiller
Copy link

Tiller commented Oct 10, 2019

Expected Behavior

Return an empty mono, or an error mono

Actual Behavior

ServerRequest.bodyToMono waits indefinitely for data

Steps to Reproduce

  • create an HTTP2 server (H2C in my case, https://github.com/Tiller/netty-leaks )
  • create a controller + endpoint that takes a ServerRequest as a parameter
  • call bodyToMono on the ServerRequest then map it to a ServerResponse
  • with an http2 client, call the endpoint without providing any body (data frame)

Possible Solution

I am not fluent enough with HTTP2 to know whether or not the behavior is "expected" or not, but I think there are different answer for different cases:

  • GET method: Why would I call bodyToMono on a GET? Well, spec-wise, nothing forbid a GET header followed by a data frame
  • POST method:
    • Content-length=0 : This is the most problematic case for me. Even though my header frame specifies that the content length is 0, the bodyToMono still waits for data.
    • Content-length=X : This case is more touchy. This is clearly a client error as we said to expect some data, but none are coming. Should we still wait endlessly for the data? I don't know... And I don't know how we could detect that

Your Environment

OS: Xubuntu 19.04 64bits 5.0.0-31-generic
JVM: openjdk version "11.0.4" 2019-07-16
Reactor: 3.3.0.M1
Spring-boot: 2.2.0.M6
Reactor-netty: 0.9.0.RC1 (note: can't test on 0.9.0.RELEASE due to #864 )
Netty: 4.1.39.Final

@Tiller Tiller added status/need-triage A new issue that still need to be evaluated as a whole type/bug A general bug labels Oct 10, 2019
@violetagg violetagg removed the status/need-triage A new issue that still need to be evaluated as a whole label Oct 11, 2019
@violetagg violetagg added this to the 0.8.13.RELEASE milestone Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants