namespace System.Net
{
-#if MOONLIGHT
- internal class WebHeaderCollection : NameValueCollection, ISerializable {
-#else
[Serializable]
[ComVisible(true)]
public class WebHeaderCollection : NameValueCollection, ISerializable {
-#endif
[Flags]
internal enum HeaderInfo
{
public WebHeaderCollection ()
{
}
+
+
+ internal WebHeaderCollection(WebHeaderCollectionType type)
+ {
+// m_Type = type;
+// if (type == WebHeaderCollectionType.HttpWebResponse)
+// m_CommonHeaders = new string[s_CommonHeaderNames.Length - 1]; // Minus one for the sentinel.
+ }
protected WebHeaderCollection (SerializationInfo serializationInfo,
StreamingContext streamingContext)
if (split && IsMultiValue (header)) {
List<string> separated = null;
foreach (var value in values) {
- if (value.IndexOf (',') < 0)
+ if (value.IndexOf (',') < 0) {
+ if (separated != null)
+ separated.Add (value);
+
continue;
+ }
if (separated == null) {
separated = new List<string> (values.Length + 1);
return sb.Append("\r\n").ToString();
}
-#if !TARGET_JVM
void ISerializable.GetObjectData (SerializationInfo serializationInfo,
StreamingContext streamingContext)
{
GetObjectData (serializationInfo, streamingContext);
}
-#endif
public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
int count = base.Count;
return;
if ((info & headerRestriction.Value) != 0)
- throw new ArgumentException ("This header must be modified with the appropiate property.");
+ throw new ArgumentException ("This header must be modified with the appropriate property.");
}
void CheckHeaderConsistency (HeaderInfo value)