-
Notifications
You must be signed in to change notification settings - Fork 38.2k
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
Spring Framework 5.3.x is incompatible with Jetty 10 (Client) #29867
Comments
We actually have such Jetty 10 sniffing and a corresponding |
@mikebell90 We always recommend upgrading to the latest version of Spring Boot, which is currently 2.7.8. Earlier versions might lack important security fixes.
@jhoeller We do, see https://github.com/spring-projects/spring-framework/blob/5.3.x/spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpResponse.java#L80, and in my personal tests with Boot 2.7.8 and Jetty 10.0.13, it seems to work fine. @mikebell90 I cannot reproduce this issue. You might want to check your classpath, and make sure that it only has Jetty 10 jars on it. Otherwise, can you provide a complete, minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces this problem? |
But what about Line 147 in e4e90bb
Which does not have such a sniff |
Indeed, though that code is pretty hard to trigger, and is only invoked when inspecting the request post exchange. At any rate, this is now fixed, see 21c3d4f |
We have recently moved to Spring Boot 2.7.5 with Jetty 10 (or are trying to).
What we found was two things - one is probably not relevant, that you have to manually manage the reactive-httpclient adapter for jetty to 2.x (would be nice if this were documented), but more importantly, the
JettyHeadersAdapter
class inorg.spring.framework.http.client.reactive
is compatible with Jetty 9 but not Jetty 10.We received errors like :
digging further, we find the JettyHeaderAdapter class imports org.eclipse.jetty.http.HttpFields and indeed this changed from a class in Jetty 9 to an interface in Jetty 10+.
methods such as
fail because of this
You fixed issues for Jetty 11/12 which were identical in https://github.com/spring-projects/spring-framework/blob/d84ca2ba90d27a7c63d7b35a6259b5b9cf341118/spring-web/src/main/java/org/springframework/http/client/reactive/JettyHeadersAdapter.java
however this fix (which would be more involved because it would have to sniff for Jetty 10 and instantiate a different JettyHeadersAdapter) has not been backported.
The text was updated successfully, but these errors were encountered: