You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This approach causes problems when our server, configured with HTTP/1.1, receives a request from a client that supports HTTP/2. For example, consider the following cURL request:
curl --http2 -v http://<Carapace URL>
The HTTP/1.1 request contains the following headers:
Our proxy forwards these headers to the backend server. If the backend server supports HTTP/2, it attempts to upgrade the connection. The proxy then forwards this response to the client, which tries to upgrade its connection with the proxy.
However, since the server part doesn't support HTTP/2 yet, the connection fails with the error "Invalid connection preface presented".
To resolve this issue, we should drop the following headers when copying headers during forwarding:
When proxying a request, we currently copy all headers without modification:
carapaceproxy/carapace-server/src/main/java/org/carapaceproxy/core/ProxyRequestsManager.java
Line 438 in 3b1d472
This approach causes problems when our server, configured with HTTP/1.1, receives a request from a client that supports HTTP/2. For example, consider the following cURL request:
The HTTP/1.1 request contains the following headers:
Our proxy forwards these headers to the backend server. If the backend server supports HTTP/2, it attempts to upgrade the connection. The proxy then forwards this response to the client, which tries to upgrade its connection with the proxy.
However, since the server part doesn't support HTTP/2 yet, the connection fails with the error "Invalid connection preface presented".
To resolve this issue, we should drop the following headers when copying headers during forwarding:
Connection
(MDN)Upgrade
(MDN)HTTP2-Settings
(no MDN page found)The text was updated successfully, but these errors were encountered: