public / sonora

A gRPC-Web implementation for Python
Apache License 2.0
243 stars 13 forks source link

Fix trailer encoding #57

Open bouk opened 1 year ago

bouk commented 1 year ago

I saw trailers encoded like b'grpc-status': b'0' which is happening because strings and bytes were being mixed. Now trailers are always strings and they're encoded in the pack_trailers method

gitpushdashf commented 1 year ago

Looks good to me, but I don't know about any wider reaching implications of this.

public commented 1 year ago

Thank you very much for the fix.

Any chance you can update the tests to cover this? e.g. unwrap_message_asgi is tested in test_protocol.py