@@ -77,28 +77,28 @@ public class Http2ConnectionTests : Http2TestBase
77
77
private static readonly byte [ ] _worldBytes = Encoding . ASCII . GetBytes ( "world" ) ;
78
78
private static readonly byte [ ] _helloWorldBytes = Encoding . ASCII . GetBytes ( "hello, world" ) ;
79
79
private static readonly byte [ ] _noData = new byte [ 0 ] ;
80
- private static readonly byte [ ] _maxData = Encoding . ASCII . GetBytes ( new string ( 'a' , Http2PeerSettings . MinAllowedMaxFrameSize ) ) ;
80
+ private static readonly byte [ ] _maxData = Encoding . ASCII . GetBytes ( new string ( 'a' , Http2Limits . MinAllowedMaxFrameSize ) ) ;
81
81
82
82
[ Fact ]
83
83
public async Task Frame_Received_OverMaxSize_FrameError ( )
84
84
{
85
85
await InitializeConnectionAsync ( _echoApplication ) ;
86
86
87
87
await StartStreamAsync ( 1 , _browserRequestHeaders , endStream : false ) ;
88
- uint length = Http2PeerSettings . MinAllowedMaxFrameSize + 1 ;
88
+ uint length = Http2Limits . MinAllowedMaxFrameSize + 1 ;
89
89
await SendDataAsync ( 1 , new byte [ length ] . AsSpan ( ) , endStream : true ) ;
90
90
91
91
await WaitForConnectionErrorAsync < Http2ConnectionErrorException > (
92
92
ignoreNonGoAwayFrames : true ,
93
93
expectedLastStreamId : 1 ,
94
94
expectedErrorCode : Http2ErrorCode . FRAME_SIZE_ERROR ,
95
- expectedErrorMessage : CoreStrings . FormatHttp2ErrorFrameOverLimit ( length , Http2PeerSettings . MinAllowedMaxFrameSize ) ) ;
95
+ expectedErrorMessage : CoreStrings . FormatHttp2ErrorFrameOverLimit ( length , Http2Limits . MinAllowedMaxFrameSize ) ) ;
96
96
}
97
97
98
98
[ Fact ]
99
99
public async Task ServerSettings_ChangesRequestMaxFrameSize ( )
100
100
{
101
- var length = Http2PeerSettings . MinAllowedMaxFrameSize + 10 ;
101
+ var length = Http2Limits . MinAllowedMaxFrameSize + 10 ;
102
102
_connectionContext . ServiceContext . ServerOptions . Limits . Http2 . MaxFrameSize = length ;
103
103
_connection = new Http2Connection ( _connectionContext ) ;
104
104
@@ -113,11 +113,11 @@ await ExpectAsync(Http2FrameType.HEADERS,
113
113
withStreamId : 1 ) ;
114
114
// The client's settings is still defaulted to Http2PeerSettings.MinAllowedMaxFrameSize so the echo response will come back in two separate frames
115
115
await ExpectAsync ( Http2FrameType . DATA ,
116
- withLength : Http2PeerSettings . MinAllowedMaxFrameSize ,
116
+ withLength : Http2Limits . MinAllowedMaxFrameSize ,
117
117
withFlags : ( byte ) Http2DataFrameFlags . NONE ,
118
118
withStreamId : 1 ) ;
119
119
await ExpectAsync ( Http2FrameType . DATA ,
120
- withLength : length - Http2PeerSettings . MinAllowedMaxFrameSize ,
120
+ withLength : length - Http2Limits . MinAllowedMaxFrameSize ,
121
121
withFlags : ( byte ) Http2DataFrameFlags . NONE ,
122
122
withStreamId : 1 ) ;
123
123
await ExpectAsync ( Http2FrameType . DATA ,
@@ -2069,7 +2069,7 @@ public async Task SETTINGS_ACK_Received_DoesNotSend_ACK()
2069
2069
{
2070
2070
await InitializeConnectionAsync ( _noopApplication ) ;
2071
2071
2072
- var frame = new Http2Frame ( ) ;
2072
+ var frame = new Http2Frame ( Http2Limits . MinAllowedMaxFrameSize ) ;
2073
2073
frame . PrepareSettings ( Http2SettingsFrameFlags . ACK ) ;
2074
2074
await SendAsync ( frame . Raw ) ;
2075
2075
@@ -2190,7 +2190,7 @@ await WaitForConnectionErrorAsync<Http2ConnectionErrorException>(
2190
2190
[ Fact ]
2191
2191
public async Task SETTINGS_Received_ChangesAllowedResponseMaxFrameSize ( )
2192
2192
{
2193
- var length = Http2PeerSettings . MinAllowedMaxFrameSize + 10 ;
2193
+ var length = Http2Limits . MinAllowedMaxFrameSize + 10 ;
2194
2194
await InitializeConnectionAsync ( context =>
2195
2195
{
2196
2196
return context . Response . Body . WriteAsync ( new byte [ length ] , 0 , length ) ;
0 commit comments