poem icon indicating copy to clipboard operation
poem copied to clipboard

gRPC: Response missing 'Content-Type' header

Open nu11ptr opened this issue 1 year ago • 0 comments

Expected Behavior

gRPC responses that include content-type header with a value of application/grpc+proto per spec

Actual Behavior

It does not seem to be included as observed via Wireshark, Dart-grpc, and grpcurl.

Dart-grpc:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: gRPC Error (code: 2, codeName: UNKNOWN, message: missing content-type header, details: null, rawResponse: null, trailers: {})

grpcurl:

ERROR:
  Code: Unknown
  Message: malformed header: missing HTTP content-type

Steps to Reproduce the Problem

  1. Run poem grpc example "helloworld"
cargo run --bin example-grpc-helloworld
  1. run grpcurl against this server:
./grpcurl -import-path ~/src/rust/poem/examples/grpc/helloworld/proto -proto  ~/src/rust/poem/examples/grpc/helloworld/proto/helloworld.proto -plaintext localhost:3000 helloworld.Greeter/SayHello

Specifications

PopOs Linux 22.04

nu11ptr avatar Mar 19 '23 21:03 nu11ptr