aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/WebHeaderCollection.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SocketHttpListener/Net/WebHeaderCollection.cs')
-rw-r--r--SocketHttpListener/Net/WebHeaderCollection.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/SocketHttpListener/Net/WebHeaderCollection.cs b/SocketHttpListener/Net/WebHeaderCollection.cs
index 66e159ccb..d82dc6816 100644
--- a/SocketHttpListener/Net/WebHeaderCollection.cs
+++ b/SocketHttpListener/Net/WebHeaderCollection.cs
@@ -131,13 +131,13 @@ namespace SocketHttpListener.Net
base.Add(headerName, headerValue);
}
- internal string[] GetValues_internal(string header, bool split)
+ internal List<string> GetValues_internal(string header, bool split)
{
if (header == null)
throw new ArgumentNullException("header");
- string[] values = base.GetValues(header);
- if (values == null || values.Length == 0)
+ var values = base.GetValues(header);
+ if (values == null || values.Count == 0)
return null;
if (split && IsMultiValue(header))
@@ -155,7 +155,7 @@ namespace SocketHttpListener.Net
if (separated == null)
{
- separated = new List<string>(values.Length + 1);
+ separated = new List<string>(values.Count + 1);
foreach (var v in values)
{
if (v == value)
@@ -177,13 +177,13 @@ namespace SocketHttpListener.Net
}
if (separated != null)
- return separated.ToArray(separated.Count);
+ return separated;
}
return values;
}
- public override string[] GetValues(string header)
+ public override List<string> GetValues(string header)
{
return GetValues_internal(header, true);
}