I have an issue in a java test where wiremock is t...
# wiremock-java
d
I have an issue in a java test where wiremock is throwing: Caused by: java.io.IOException: Received RST_STREAM: Stream cancelled at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:964) If I hack the code for the builder to only use http v1 it fixes it: 2 questions, 1. what is the correct way to disable http2? https://wiremock.org/docs/configuration/ According to that page you can disable it with
Copy code
http2PlainDisabled(true);
but I don't find that method anywhere 2. why is http2 not working?
b
Which version of WireMock are you using? I believe this method was a fairly recent addition
d
<version>3.3.1</version>
b
Could you try upgrading to the latest version and see if the method is available after?
d
which isn't even on Maven central yet
I'll try thanks,
but why is wiremock even throwing that error, would an upgrade fix that?
Updating to latest allows this now @Rule WireMockRule wm = new WireMockRule(_options_().http2PlainDisabled(true)); but the call still fails with : IOException: Received RST_STREAM: Stream cancelled
b
Hmm.. I’d have to dive deeper into that first. Maybe @Lee Turner or @Tom knows what’s happening here?
d
I've dug a bit deeper and foudn where it's configured and the updated jar and options().http2PlainDisabled(true) allow it to run so I can move on, But yes still curious why http2 needs disabling Thanks for your help
👍 1
t
The reason is this issue, basically: https://github.com/jetty/jetty.project/issues/11588 I think the underlying reason might actually be that the Java client is trying an upgrade when it shouldn’t per the latest version of the spec, but it’s not 100% clear at this point.
142 Views