Skip to content
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

Unexpected compression flag/Corrupted data frame #492

Closed
MarnixKuijs opened this issue Nov 12, 2020 · 2 comments · Fixed by #663
Closed

Unexpected compression flag/Corrupted data frame #492

MarnixKuijs opened this issue Nov 12, 2020 · 2 comments · Fixed by #663
Labels
A-tonic C-bug Category: Something isn't working
Milestone

Comments

@MarnixKuijs
Copy link

Bug Report

Version

0.3.1

Platform

Rust: 1.49.0-nightly

OS: Windows 10 version 2004

Description

I'm writing a custom gRPC client that is based on top of WinHttp. I'm communicating with a gRPC server that is implemented via Tonic. I'm sending, as far as I know, a valid gRPC request, but I get a response back from the Tonic server that indicates that there was an error:

HTTP/1.1 200 
Date: Thu, 12 Nov 2020 19:58:53 GMT
Content-Type: application/grpc
grpc-status: 13
grpc-message: Unexpected compression flag: 64, while sending request

Tls is enabled on both my client and server and the HTTP/2 connection is established via the ALPN. I have set all the necessary flags on the WinHttp side to start sending HTTP/2 request.

As far as I know I do have a valid HTTP/2 connection. I am sending over a valid Http/2 Connection preface and SETTINGS frame and it passes all theses checks on the server My request gets all the way to where tonic starts processing the request, but when it starts decoding the stream it errors out.

My first thought was simply that I forgot to set the compression flag in my request. I took to the discord of tonic to ask around. I got some answers from the developers and it seems that the my data frames are incorrect somehow. I'm opening this issue per request by @LucioFranco.

@LucioFranco LucioFranco added C-bug Category: Something isn't working A-tonic labels Nov 12, 2020
@LucioFranco LucioFranco added this to the 0.4 milestone Nov 27, 2020
@LucioFranco
Copy link
Member

I believe in this case we need to just expand the error message to state that we are not talking the correct protocol. So it should just be adding some extra message https://github.com/hyperium/tonic/blob/master/tonic/src/codec/decode.rs#L173

@davidpdrsn
Copy link
Member

@LucioFranco something like this #663?

davidpdrsn added a commit that referenced this issue May 28, 2021
* fix(codec): improve error message for invalid compression flag

Fixes #492

* Update tonic/src/codec/decode.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tonic C-bug Category: Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants