Reacting to XmlDictionaryQuotas change from the fundamentals team.
This commit is contained in:
parent
993e8fd077
commit
fbaac1095a
|
|
@ -1,7 +1,6 @@
|
||||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
|
|
@ -24,18 +23,14 @@ namespace Microsoft.AspNet.Mvc
|
||||||
/// <returns>XmlReaderQuotas with default values</returns>
|
/// <returns>XmlReaderQuotas with default values</returns>
|
||||||
public static XmlDictionaryReaderQuotas GetDefaultXmlReaderQuotas()
|
public static XmlDictionaryReaderQuotas GetDefaultXmlReaderQuotas()
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
|
||||||
return new XmlDictionaryReaderQuotas()
|
return new XmlDictionaryReaderQuotas()
|
||||||
{
|
{
|
||||||
MaxArrayLength = Int32.MaxValue,
|
MaxArrayLength = int.MaxValue,
|
||||||
MaxBytesPerRead = Int32.MaxValue,
|
MaxBytesPerRead = int.MaxValue,
|
||||||
MaxDepth = DefaultMaxDepth,
|
MaxDepth = DefaultMaxDepth,
|
||||||
MaxNameTableCharCount = Int32.MaxValue,
|
MaxNameTableCharCount = int.MaxValue,
|
||||||
MaxStringContentLength = Int32.MaxValue
|
MaxStringContentLength = int.MaxValue
|
||||||
};
|
};
|
||||||
#else
|
|
||||||
return XmlDictionaryReaderQuotas.Max;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue