AThilenius / axum-connect

Axum + Connect-Web = ♥️
Apache License 2.0
79 stars 6 forks source link

Server-streaming RPC handlers incorrect treat requests as unary #6

Closed AThilenius closed 8 months ago

AThilenius commented 8 months ago

I overlooked a subtle implementation detail in the https://connectrpc.com/docs/protocol/#streaming-rpcs spec: server-streaming RPCs actually expect in a 'stream' of enveloped messages. Axum-connect incorrectly treats them as unary JSON payloads and fails to decode them.

AThilenius commented 8 months ago

Well, I thought I was wrong, but I was mistaken. It does expect unary requests. I think my bespoke client impl is just wrong.