-
Notifications
You must be signed in to change notification settings - Fork 89
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
Bandit.HTTP2.Stream.StreamError when trying to use Envoy HTTP/2 listeners #159
Comments
The error is cause by @mtrudel |
The danger if we do that is that the URI we construct & pass to the plug may not reflect the actual on-the-wire protocol used (the specific risk is that we indicate the connection to be https when in point of fact it's being delivered over http). This is really the same distinction as we previously had to make for the port value, only for the scheme value this time around, so I was initially inclined to say that we should solve it the same way we did then.... EXCEPT in digging into the RFCs just now, I realized that RFC9113§8.3.1 is actually normative about schemes, at least for HTTP/2:
I would read that as suggesting that we should actually be using the scheme as declared in the
In the meantime, what does that mean here? I think we should accept whatever scheme is declared in the request (for both HTTP/1 and HTTP/2 for consistency). I don't see a whole lot of value to logging on a transport mismatch, since in cases such as the originally reported one, we'll be logging that warning on every request. |
Merged & released as |
We have Bandit running fine under HTTP/1 with our Envoy App Mesh setup, but see the following error when trying to switch to HTTP/2:
The error is reported as coming from this line, but I'm not sure where to go after this.
bandit/lib/bandit/http2/stream_task.ex
Line 72 in 9b71290
Cowboy seems to permit the connection, though I understand it opts to fail silently in most error cases.
If anyone has any advice about where else to look, I'll do my best to provide more information.
The text was updated successfully, but these errors were encountered: