Open benba opened 5 months ago
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.
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