Skip to content

Commit 2517f0e

Browse files
committed
PR feedback
1 parent 6795a24 commit 2517f0e

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/Servers/Kestrel/Core/src/Http2Limits.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,5 @@ public int InitialStreamWindowSize
141141
_initialStreamWindowSize = value;
142142
}
143143
}
144-
145-
/// <summary>
146-
/// Gets or sets a value that controls whether dynamic compression of response headers is allowed.
147-
/// For more information about the security considerations of HPack dynamic header compression, visit
148-
/// https://tools.ietf.org/html/rfc7541#section-7.
149-
/// </summary>
150-
/// <remarks>
151-
/// Defaults to true.
152-
/// </remarks>
153-
public bool AllowResponseHeaderCompression { get; set; } = true;
154144
}
155145
}

src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public Http2FrameWriter(
7171
_outgoingFrame = new Http2Frame();
7272
_headerEncodingBuffer = new byte[_maxFrameSize];
7373

74-
_hpackEncoder = new HPackEncoder(!serviceContext.ServerOptions.Limits.Http2.AllowResponseHeaderCompression);
74+
_hpackEncoder = new HPackEncoder(!serviceContext.ServerOptions.AllowResponseHeaderCompression);
7575
}
7676

7777
public void UpdateMaxHeaderTableSize(uint maxHeaderTableSize)

src/Servers/Kestrel/Core/src/KestrelServerOptions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ public class KestrelServerOptions
3838
/// </remarks>
3939
public bool AddServerHeader { get; set; } = true;
4040

41+
/// <summary>
42+
/// Gets or sets a value that controls whether dynamic compression of response headers is allowed.
43+
/// For more information about the security considerations of HPack dynamic header compression, visit
44+
/// https://tools.ietf.org/html/rfc7541#section-7.
45+
/// </summary>
46+
/// <remarks>
47+
/// Defaults to true.
48+
/// </remarks>
49+
public bool AllowResponseHeaderCompression { get; set; } = true;
50+
4151
/// <summary>
4252
/// Gets or sets a value that controls whether synchronous IO is allowed for the <see cref="HttpContext.Request"/> and <see cref="HttpContext.Response"/>
4353
/// </summary>

src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,7 @@ public void OnStaticIndexedHeader(int index, ReadOnlySpan<byte> value)
20112011
[Fact]
20122012
public async Task HEADERS_DisableDynamicHeaderCompression_HeadersNotCompressed()
20132013
{
2014-
_serviceContext.ServerOptions.Limits.Http2.AllowResponseHeaderCompression = false;
2014+
_serviceContext.ServerOptions.AllowResponseHeaderCompression = false;
20152015

20162016
await InitializeConnectionAsync(_noopApplication);
20172017

0 commit comments

Comments
 (0)