Description
Proposal
During the migration to cxf 3.6.1 from 3.5.6 wiremock tests start failing. After investigation we found that larger requests (> 6800 characters) to the wiremock (2.35.0) server fail with several different exceptions:
- java.io.EOFException: EOF reached while reading
- java.io.IOException: Received RST_STREAM: Stream cancelled
- GOAWAY http response received
These all occured in the HTTPConduit of cxf, using the java.net.http/jdk.internal.net.http.Http2Connection.
Configuring cxf to use HTTP1.1 immediately resolved all these exceptions and our requests went through to the server as normal.
Reproduction steps
HTTP-Client
HTTPClient client = HTTPClient.newBuilder().version(HTTP_2).cookieHandler(...).build()
client.send(request, responseBodyHandler);
Test
@wiremocktest
public class Testclass {
@test
public void test(WireMockRuntimeInfo info) {
WireMock.stubFor(post(urlEqualTo(...)).withRequestBody(...).willReturn(...));
// create client and send soap request (issues started at xml with at least 6800 characters)
// Exception occurs
}
}
References
The same issue has been reported in #2461 and #2459.
Both were closed by the reporter because they found some workaround on the bug. But their issues are unresolved.
Note that these issues are for Wiremock 3.2.0, so this is not contained to the wiremock 2!