Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@ -130,6 +130,9 @@ namespace System.Web.Util {
if (settings == null || !Boolean.TryParse(settings["aspnet:EnableAsyncModelBinding"], out _enableAsyncModelBinding))
_enableAsyncModelBinding = BinaryCompatibility.Current.TargetsAtLeastFramework46;
if (settings == null || !int.TryParse(settings["aspnet:RequestQueueLimitPerSession"], out _requestQueueLimitPerSession) || _requestQueueLimitPerSession < 0)
_requestQueueLimitPerSession = BinaryCompatibility.Current.TargetsAtLeastFramework463 ? DefaultRequestQueueLimitPerSession : UnlimitedRequestsPerSession;
_settingsInitialized = true;
}
}
@ -492,5 +495,16 @@ namespace System.Web.Util {
return _enableAsyncModelBinding;
}
}
internal const int UnlimitedRequestsPerSession = Int32.MaxValue;
internal const int DefaultRequestQueueLimitPerSession = 50;
// Limit of queued requests per session
private static int _requestQueueLimitPerSession;
internal static int RequestQueueLimitPerSession {
get {
EnsureSettingsLoaded();
return _requestQueueLimitPerSession;
}
}
}
}