Fixes #3829 - Avoid sending empty trailer frames for http/2 responses.

Added guard against the supplier of trailers returning null.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2019-07-11 15:06:15 +02:00
parent a2011abec0
commit 9f84c1cb8e
1 changed files with 2 additions and 0 deletions

View File

@ -215,6 +215,8 @@ public class HttpTransportOverHTTP2 implements HttpTransport
if (supplier == null)
return null;
HttpFields trailers = supplier.get();
if (trailers == null)
return null;
return trailers.size() == 0 ? null : trailers;
}