private static void CopyResponseHeaders(HttpContext httpContext, HttpHeaders source, IHeaderDictionary destination) { var isHttp2OrGreater = ProtocolHelper.IsHttp2OrGreater(httpContext.Request.Protocol); foreach (var header in source) { var headerName = header.Key; if (RequestUtilities.ShouldSkipResponseHeader(headerName, isHttp2OrGreater)) { continue; } destination.Append(headerName, header.Value.ToArray()); } }