-
Notifications
You must be signed in to change notification settings - Fork 435
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
grpcwebproxy does not handle 'Connection: keep-alive' header properly #568
Comments
Hi Stanley, thanks for the detailed bug report! I imagine we may need to just whitelist this header. Is it being passed through to the gRPC backend? Should it be? |
I am not sure if that header semantically mean anything to the gRPC Backend. So I will leave it up to you. Thanks! |
What is the envoy proxy behaviour in this case? |
I just tried. Interestingly, the |
Thanks, I guess we'll want to duplicate that behaviour. |
See also #404 I think this is the same cause for that error |
We are experience the same issue in our build, although with a slighty different error message.
We are able to establish a connection if we update main.go:154 to delete(mdCopy, "connection") |
@crlssn Would you be interested in contributing this fix? Sounds like we should just drop the connection header. |
@johanbrandhorst I've opened a PR here: #588. |
Closed by #588 |
Issue summary:
Connection: keep-alive
, the grpcwebproxy does not seem to be able to handle it and returns an errorstream terminated by RST_STREAM with error code: PROTOCOL_ERROR
.Connection:
header at all, the basic curl request works.Connection:
header, regardless of the valuekeep-alive
orclose
, the grpcwebproxy returns the error. The grpc request never made it to the backend server.Connection: keep-alive
header seems to be automatically added by the browser (tested with Chrome and Firefox) - I didn't set that header explicitly myself from my web test app.This is the error log being printed out by
grpcwebproxy
To reproduce:
From one shell, start the backend gRPC server (this one written in Node, listening at
:9090
):From another shell, start
grpcwebproxy
(listening at:8080
):We need to write some bytes for the request first
Now if you run this curl command, without the
Connection: keep-alive
header, it will return success. The grpc-web request made it all the way to the backend server and the response fromgrpcwebproxy
were properly formatted:But now if you add the
Connection: keep-alive
header to the curl command, it will return an error:I am using the
0.11.0
version ofgrpcwebproxy
.This is how the
grpcwebproxy
was started (full dockerfile here):The text was updated successfully, but these errors were encountered: