diff --git a/tonic-web/src/call.rs b/tonic-web/src/call.rs index 2bdcdc60c..4b66e44f0 100644 --- a/tonic-web/src/call.rs +++ b/tonic-web/src/call.rs @@ -304,9 +304,10 @@ where } } FindTrailers::IncompleteBuf => continue, - FindTrailers::Done(len) => { - Poll::Ready(Some(Ok(Frame::data(buf.split_to(len).freeze())))) - } + FindTrailers::Done(len) => Poll::Ready(match len { + 0 => None, + _ => Some(Ok(Frame::data(buf.split_to(len).freeze()))), + }), }; } }