Ignore MaxRequestBodySize for upgraded requests (#13477)
This commit is contained in:
parent
3e253f6a40
commit
ecae6838b8
|
|
@ -312,6 +312,7 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
|
|||
throw new InvalidOperationException(CoreStrings.UpgradeCannotBeCalledMultipleTimes);
|
||||
}
|
||||
|
||||
MaxRequestBodySize = null;
|
||||
_wasUpgraded = true;
|
||||
|
||||
StatusCode = StatusCodes.Status101SwitchingProtocols;
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ namespace TestSite
|
|||
|
||||
// Upgrade the connection
|
||||
Stream opaqueTransport = await upgradeFeature.UpgradeAsync();
|
||||
Assert.Null(context.Features.Get<IHttpMaxRequestBodySizeFeature>().MaxRequestBodySize);
|
||||
|
||||
// Get the WebSocket object
|
||||
var ws = WebSocket.CreateFromStream(opaqueTransport, isServer: true, subProtocol: null, keepAliveInterval: TimeSpan.FromMinutes(2));
|
||||
|
|
|
|||
Loading…
Reference in New Issue