You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I submit two HTTPS POST requests using HttpClient, and the second request has an empty request body (content-length: 0), then the client hangs, and does not emit a response.
When I do the same over HTTP, it works. So, this appears isolated to HTTPS.
I only tried this with the JDK SSL Provider. Did not try with the OpenSSL provider.
I originally reported this against WebClient as spring-projects/spring-framework#22819, but I later determined it was related to empty request bodies (instead of empty response bodies as originally reported), and I was able to reproduce using HttpClient without using WebClient. So it appears to be reactor-netty related.
I have a created a unit test (project attached) that executes requests against an okhttp3 MockWebServer to demonstrate the issue.
The unit test has three methods that each execute two requests against the mock server
The HTTP test passes.
The HTTPS test with non-empty request bodies passes
The HTTPS test with empty request bodies fails with a timeout exception waiting on the second response.
Expected behavior
POST requests sent over HTTPS with empty bodies return a response.
Actual behavior
POST requests sent over HTTPS with empty bodies can hang.
If chunked encoding is used (which is what the unit test does), the request is never fully sent (and the server never responds)
If chunked encoding is not used (by explicitly providing Content-Length header), then the server will respond, but the client still doesn't emit the response.
Steps to reproduce
Execute attached unit test.
The failing test case (testHttps_emptyRequestBody) does the following:
Submits a POST request over HTTPS
Submits another POST request over HTTPS with an empty response body
Reactor Netty version
module
version
reactor-core
3.2.8.RELEASE
reactor-netty
0.8.6.RELEASE
netty
4.1.34.Final
JVM version (e.g. java -version)
Reproduced on both 1.8.0_172 and 11.0.2
OS version (e.g. uname -a)
Windows 10 Version 1709
The text was updated successfully, but these errors were encountered:
If I submit two HTTPS POST requests using
HttpClient
, and the second request has an empty request body (content-length: 0), then the client hangs, and does not emit a response.When I do the same over HTTP, it works. So, this appears isolated to HTTPS.
I only tried this with the JDK SSL Provider. Did not try with the OpenSSL provider.
I originally reported this against
WebClient
as spring-projects/spring-framework#22819, but I later determined it was related to empty request bodies (instead of empty response bodies as originally reported), and I was able to reproduce usingHttpClient
without usingWebClient
. So it appears to be reactor-netty related.I have a created a unit test (project attached) that executes requests against an okhttp3 MockWebServer to demonstrate the issue.
The unit test has three methods that each execute two requests against the mock server
Expected behavior
POST requests sent over HTTPS with empty bodies return a response.
Actual behavior
POST requests sent over HTTPS with empty bodies can hang.
If chunked encoding is used (which is what the unit test does), the request is never fully sent (and the server never responds)
If chunked encoding is not used (by explicitly providing
Content-Length
header), then the server will respond, but the client still doesn't emit the response.Steps to reproduce
Execute attached unit test.
The failing test case (testHttps_emptyRequestBody) does the following:
Reactor Netty version
JVM version (e.g.
java -version
)Reproduced on both 1.8.0_172 and 11.0.2
OS version (e.g.
uname -a
)Windows 10 Version 1709
The text was updated successfully, but these errors were encountered: