| 301 | } |
| 302 | |
| 303 | public static Http2Headers convertServerHeaders(Metadata headers) { |
| 304 | // Discard any application supplied duplicates of the reserved headers |
| 305 | headers.discardAll(CONTENT_TYPE_KEY); |
| 306 | headers.discardAll(GrpcUtil.TE_HEADER); |
| 307 | headers.discardAll(GrpcUtil.USER_AGENT_KEY); |
| 308 | |
| 309 | return GrpcHttp2OutboundHeaders.serverResponseHeaders(toHttp2Headers(headers)); |
| 310 | } |
| 311 | |
| 312 | public static Metadata convertTrailers(Http2Headers http2Headers) { |
| 313 | if (http2Headers instanceof GrpcHttp2InboundHeaders) { |