From 3f547463a21f136cccb9b37c5a2a3ffd618bf959 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Wed, 19 Jun 2019 13:30:05 -0700 Subject: [PATCH] Fix http2 tests (SettingsFrame does not propagate flags) (dotnet/corefx#38694) Commit migrated from https://github.com/dotnet/corefx/commit/37a56121a88d8e67da75e2e5201f2c1c87c7b551 --- src/libraries/Common/tests/System/Net/Http/Http2Frames.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/libraries/Common/tests/System/Net/Http/Http2Frames.cs b/src/libraries/Common/tests/System/Net/Http/Http2Frames.cs index 11f4309..03f7f2d 100644 --- a/src/libraries/Common/tests/System/Net/Http/Http2Frames.cs +++ b/src/libraries/Common/tests/System/Net/Http/Http2Frames.cs @@ -413,12 +413,17 @@ namespace System.Net.Test.Common { public List Entries; - public SettingsFrame(params SettingsEntry[] entries) : - base(entries.Length * 6, FrameType.Settings, FrameFlags.None, 0) + public SettingsFrame(FrameFlags flags, SettingsEntry[] entries) : + base(entries.Length * 6, FrameType.Settings, flags, 0) { Entries = new List(entries); } + public SettingsFrame(params SettingsEntry[] entries) : + this(FrameFlags.None, entries) + { + } + public static SettingsFrame ReadFrom(Frame header, ReadOnlySpan buffer) { var entries = new List(); @@ -433,7 +438,7 @@ namespace System.Net.Test.Common entries.Add(new SettingsEntry { SettingId = id, Value = value }); } - return new SettingsFrame(entries.ToArray()); + return new SettingsFrame(header.Flags, entries.ToArray()); } public override void WriteTo(Span buffer) -- 2.7.4