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

fix(transport): Add content-type for Unimplemented #434

Merged
merged 2 commits into from
Aug 21, 2020

Conversation

entropitor
Copy link
Contributor

Motivation

According to the spec content-type should be set

Solution

Add the application/grpc for Unimplemented

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
@entropitor
Copy link
Contributor Author

Updated!

Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@LucioFranco LucioFranco changed the title Add content-type for Unimplemented fix(transport): Add content-type for Unimplemented Aug 21, 2020
@LucioFranco LucioFranco merged commit 594a542 into hyperium:master Aug 21, 2020
@edrevo
Copy link
Contributor

edrevo commented Aug 29, 2020

Do we have any tests that cover this? I am compiling against the latest commit in master (40e64b5) and I'm getting a HTTP status code 200; transport: missing content-type field error from grpc-go when an unimplemented method is being invoked.

Here's a snippet of my Cargo.toml:

tonic = { git = "https://github.com/hyperium/tonic/" }

And the corresponding snippet from Cargo.lock:

[[package]]
name = "tonic"
version = "0.3.1"
source = "git+https://github.com/hyperium/tonic/#40e64b53a74bab4da5eb8a13a0ab95b872b8ac98"
dependencies = [
 "async-stream",
 "async-trait",
 "base64",
 "bytes",
 "futures-core",
 "futures-util",
 "http",
 "http-body",
 "hyper",
 "percent-encoding",
 "pin-project",
 "prost",
 "prost-derive",
 "tokio",
 "tokio-util",
 "tower",
 "tower-balance",
 "tower-load",
 "tower-make",
 "tower-service",
 "tracing",
 "tracing-futures",
]

@LucioFranco
Copy link
Member

@edrevo I don't see anything wrong with this PR but we don't have tests for this specific one. Do you by chance have an output of the h2 frames between that and grpc-go, it would be good to see what is actually happening on the wire.

@edrevo
Copy link
Contributor

edrevo commented Aug 30, 2020

Is there any easy way of getting the actual frames? I've set the log level to trace, but the actual frame content doesn't seem to be logged: https://gist.github.com/edrevo/853fe19a3593cfd724fa779332310c0a

@edrevo
Copy link
Contributor

edrevo commented Aug 30, 2020

Found it! #441

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants