-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Gateway MVC] ERR_HTTP2_PROTOCOL_ERROR if HTTP/2 enabled #3326
Labels
Milestone
Comments
PRs welcome |
benba
added a commit
to benba/spring-cloud-gateway
that referenced
this issue
Apr 22, 2024
benba
added a commit
to benba/spring-cloud-gateway
that referenced
this issue
Apr 22, 2024
benba
added a commit
to benba/spring-cloud-gateway
that referenced
this issue
Apr 22, 2024
For anyone stumbling upon this and looking for a workaround, I replaced the JDK HttpClient by adding Apache httpclient (org.apache.httpcomponents.client5:httpclient5) dependency and adding spring.cloud.gateway.mvc.http-client.type: autodetect. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if
server.http2.enabled
is set totrue
, usingJDK HttpClient
, and if the downstream server also exchange inHTTP/2
, aHTTP/2
protocol error will be raised (ERR_HTTP2_PROTOCOL_ERROR
in Chrome for example).curl
gives more details about the issue:PROTOCOL_ERROR Invalid HTTP header filed was received: frame type: 1, stream: 1, name: [:status], value: [200]
An easy workardound is to add a
HttpHeadersFilter.ResponseHttpHeadersFilter
that removes the:status
pseudo-header.I can submit a PR if you feel that it's an appropriate fix
The text was updated successfully, but these errors were encountered: