//
// Authors:
// Tim Coleman (tim@timcoleman.com)
+// Chris Toshok (toshok@ximian.com)
//
// Copyright (C) Tim Coleman, 2004
-// (c) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004,2005 Novell, Inc. (http://www.novell.com)
//
//
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+ //
-#if NET_2_0 && XML_DEP
+#if CONFIGURATION_DEP
using System.Configuration;
{
#region Fields
- ConfigurationPropertyCollection properties;
- static ConfigurationProperty maximumResponseHeadersLength = new ConfigurationProperty ("MaximumResponseHeadersLength", typeof (int), 64);
+ static ConfigurationProperty maximumErrorResponseLengthProp;
+ static ConfigurationProperty maximumResponseHeadersLengthProp;
+ static ConfigurationProperty maximumUnauthorizedUploadLengthProp;
+ static ConfigurationProperty useUnsafeHeaderParsingProp;
+ static ConfigurationPropertyCollection properties;
#endregion // Fields
#region Constructors
- public HttpWebRequestElement ()
+ static HttpWebRequestElement ()
{
+ maximumErrorResponseLengthProp = new ConfigurationProperty ("maximumErrorResponseLength", typeof (int), 64);
+ maximumResponseHeadersLengthProp = new ConfigurationProperty ("maximumResponseHeadersLength", typeof (int), 64);
+ maximumUnauthorizedUploadLengthProp = new ConfigurationProperty ("maximumUnauthorizedUploadLength", typeof (int), -1);
+ useUnsafeHeaderParsingProp = new ConfigurationProperty ("useUnsafeHeaderParsing", typeof (bool), false);
properties = new ConfigurationPropertyCollection ();
- properties.Add (maximumResponseHeadersLength);
+
+ properties.Add (maximumErrorResponseLengthProp);
+ properties.Add (maximumResponseHeadersLengthProp);
+ properties.Add (maximumUnauthorizedUploadLengthProp);
+ properties.Add (useUnsafeHeaderParsingProp);
+ }
+
+ public HttpWebRequestElement ()
+ {
}
#endregion // Constructors
#region Properties
- protected override ConfigurationPropertyCollection Properties {
- get { return properties; }
+ [ConfigurationProperty("maximumErrorResponseLength", DefaultValue = "64")]
+ public int MaximumErrorResponseLength {
+ get { return (int) base[maximumErrorResponseLengthProp]; }
+ set { base [maximumErrorResponseLengthProp] = value; }
}
+ [ConfigurationProperty("maximumResponseHeadersLength", DefaultValue = "64")]
public int MaximumResponseHeadersLength {
- get { return (int) base [maximumResponseHeadersLength]; }
- set { base [maximumResponseHeadersLength] = value; }
+ get { return (int) base [maximumResponseHeadersLengthProp]; }
+ set { base [maximumResponseHeadersLengthProp] = value; }
+ }
+
+ [ConfigurationProperty("maximumUnauthorizedUploadLength", DefaultValue = "-1")]
+ public int MaximumUnauthorizedUploadLength {
+ get { return (int) base [maximumUnauthorizedUploadLengthProp]; }
+ set { base [maximumUnauthorizedUploadLengthProp] = value; }
+ }
+
+ [ConfigurationProperty("useUnsafeHeaderParsing", DefaultValue = "False")]
+ public bool UseUnsafeHeaderParsing {
+ get { return (bool) base [useUnsafeHeaderParsingProp]; }
+ set { base[useUnsafeHeaderParsingProp] = value; }
+ }
+
+ protected override ConfigurationPropertyCollection Properties {
+ get { return properties; }
}
#endregion // Properties
+
+
+ #region Methods
+
+ [MonoTODO]
+ protected override void PostDeserialize ()
+ {
+ base.PostDeserialize ();
+ }
+
+ #endregion // Methods
}
}