tsloughter / grpcbox

Erlang grpc on chatterbox
Apache License 2.0
139 stars 62 forks source link

grpc-timeout header not matching the spec #85

Closed tonnyk00 closed 2 years ago

tonnyk00 commented 2 years ago

Hi,

When testing with a deadline in context, the timeout value is converted to nanosecond in grpc-timeout header. But there is no check of the TimeoutValue range, which could result in the server rejecting the msg with protocol error.

The grpc spec specified that the TimeoutValue can contain at most 8 digits:

TimeoutValue → {positive integer as ASCII string of at most 8 digits}

Best regards, Tonny

tsloughter commented 2 years ago

Ah thanks!