@@ -76,28 +76,28 @@ public class Http2ConnectionTests : Http2TestBase
76
76
private static readonly byte [ ] _worldBytes = Encoding . ASCII . GetBytes ( "world" ) ;
77
77
private static readonly byte [ ] _helloWorldBytes = Encoding . ASCII . GetBytes ( "hello, world" ) ;
78
78
private static readonly byte [ ] _noData = new byte [ 0 ] ;
79
- private static readonly byte [ ] _maxData = Encoding . ASCII . GetBytes ( new string ( 'a' , Http2Limits . MinAllowedMaxFrameSize ) ) ;
79
+ private static readonly byte [ ] _maxData = Encoding . ASCII . GetBytes ( new string ( 'a' , Http2PeerSettings . MinAllowedMaxFrameSize ) ) ;
80
80
81
81
[ Fact ]
82
82
public async Task Frame_Received_OverMaxSize_FrameError ( )
83
83
{
84
84
await InitializeConnectionAsync ( _echoApplication ) ;
85
85
86
86
await StartStreamAsync ( 1 , _browserRequestHeaders , endStream : false ) ;
87
- uint length = Http2Limits . MinAllowedMaxFrameSize + 1 ;
87
+ uint length = Http2PeerSettings . MinAllowedMaxFrameSize + 1 ;
88
88
await SendDataAsync ( 1 , new byte [ length ] . AsSpan ( ) , endStream : true ) ;
89
89
90
90
await WaitForConnectionErrorAsync < Http2ConnectionErrorException > (
91
91
ignoreNonGoAwayFrames : true ,
92
92
expectedLastStreamId : 1 ,
93
93
expectedErrorCode : Http2ErrorCode . FRAME_SIZE_ERROR ,
94
- expectedErrorMessage : CoreStrings . FormatHttp2ErrorFrameOverLimit ( length , Http2Limits . MinAllowedMaxFrameSize ) ) ;
94
+ expectedErrorMessage : CoreStrings . FormatHttp2ErrorFrameOverLimit ( length , Http2PeerSettings . MinAllowedMaxFrameSize ) ) ;
95
95
}
96
96
97
97
[ Fact ]
98
98
public async Task ServerSettings_ChangesRequestMaxFrameSize ( )
99
99
{
100
- var length = Http2Limits . MinAllowedMaxFrameSize + 10 ;
100
+ var length = Http2PeerSettings . MinAllowedMaxFrameSize + 10 ;
101
101
_connectionContext . ServiceContext . ServerOptions . Limits . Http2 . MaxFrameSize = length ;
102
102
_connection = new Http2Connection ( _connectionContext ) ;
103
103
@@ -112,11 +112,11 @@ await ExpectAsync(Http2FrameType.HEADERS,
112
112
withStreamId : 1 ) ;
113
113
// The client's settings is still defaulted to Http2PeerSettings.MinAllowedMaxFrameSize so the echo response will come back in two separate frames
114
114
await ExpectAsync ( Http2FrameType . DATA ,
115
- withLength : Http2Limits . MinAllowedMaxFrameSize ,
115
+ withLength : Http2PeerSettings . MinAllowedMaxFrameSize ,
116
116
withFlags : ( byte ) Http2DataFrameFlags . NONE ,
117
117
withStreamId : 1 ) ;
118
118
await ExpectAsync ( Http2FrameType . DATA ,
119
- withLength : length - Http2Limits . MinAllowedMaxFrameSize ,
119
+ withLength : length - Http2PeerSettings . MinAllowedMaxFrameSize ,
120
120
withFlags : ( byte ) Http2DataFrameFlags . NONE ,
121
121
withStreamId : 1 ) ;
122
122
await ExpectAsync ( Http2FrameType . DATA ,
@@ -2139,7 +2139,7 @@ public async Task SETTINGS_ACK_Received_DoesNotSend_ACK()
2139
2139
{
2140
2140
await InitializeConnectionAsync ( _noopApplication ) ;
2141
2141
2142
- var frame = new Http2Frame ( Http2Limits . MinAllowedMaxFrameSize ) ;
2142
+ var frame = new Http2Frame ( Http2PeerSettings . MinAllowedMaxFrameSize ) ;
2143
2143
frame . PrepareSettings ( Http2SettingsFrameFlags . ACK ) ;
2144
2144
await SendAsync ( frame . Raw ) ;
2145
2145
@@ -2262,7 +2262,7 @@ public async Task SETTINGS_Received_ChangesAllowedResponseMaxFrameSize()
2262
2262
{
2263
2263
// This includes the default response headers such as :status, etc
2264
2264
var defaultResponseHeaderLength = 37 ;
2265
- var headerValueLength = Http2Limits . MinAllowedMaxFrameSize ;
2265
+ var headerValueLength = Http2PeerSettings . MinAllowedMaxFrameSize ;
2266
2266
// First byte is always 0
2267
2267
// Second byte is the length of header name which is 1
2268
2268
// Third byte is the header name which is A/B
0 commit comments