[Modify] Remove it

This commit is contained in:
sta 2018-08-24 20:47:52 +09:00
parent 1e6633da4e
commit 171e84449a

View File

@ -630,35 +630,6 @@ namespace WebSocketSharp.Net
return null; return null;
} }
internal static NameValueCollection InternalParseQueryString (string query, Encoding encoding)
{
int len;
if (query == null || (len = query.Length) == 0 || (len == 1 && query[0] == '?'))
return new NameValueCollection (1);
if (query[0] == '?')
query = query.Substring (1);
var res = new QueryStringCollection ();
var components = query.Split ('&');
foreach (var component in components) {
var i = component.IndexOf ('=');
if (i > -1) {
var name = UrlDecode (component.Substring (0, i), encoding);
var val = component.Length > i + 1
? UrlDecode (component.Substring (i + 1), encoding)
: String.Empty;
res.Add (name, val);
}
else {
res.Add (null, UrlDecode (component, encoding));
}
}
return res;
}
internal static string InternalUrlDecode ( internal static string InternalUrlDecode (
byte[] bytes, int offset, int count, Encoding encoding) byte[] bytes, int offset, int count, Encoding encoding)
{ {