[Gateway MVC] ERR_HTTP2_PROTOCOL_ERROR if HTTP/2 enabled
if server.http2.enabled is set to true, using JDK HttpClient, and if the downstream server also exchange in HTTP/2, a HTTP/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
PRs welcome
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.