Description
After generating a certificate, adding certificate to mozilla (cause it is self signed), it started printing garbage data. Why is that ?
What am I doing wrong ?
Oh, and btw, I was running some tests when I found an error on class "CookiesStorage : ICookiesStorage" method "CookiesStorage(string cookie)"; If the cookie string is something like this : name=value; name=value1=value2; name=othervalue , it crashes (index error). What I did (code not pretty):
_values = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase); if (cookie.Contains(";")) // check for multiple cookies { var rawcookies = cookie.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < rawcookies.Length; i++) { string raw = rawcookies[i].Trim(); if (raw.Contains("=")) { if (raw.StartsWith(" ")) { raw = raw.Substring(1); } string[] cookieDetails = raw.Split(new char[] { '=' }, 2); if (cookieDetails.Length == 2) { var key = cookieDetails[0]; var value = cookieDetails[1]; _values[key] = value; } } } } else if (cookie.Contains("=")) // must change { var rawcookies = cookie.Split(new char[] { '=' }, 2); if (rawcookies.Length == 2) { var key = rawcookies[0]; var value = rawcookies[1]; _values[key] = value; } }