Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Garbage data #24

Open
arkanSoul opened this issue Nov 14, 2018 · 1 comment
Open

SSL Garbage data #24

arkanSoul opened this issue Nov 14, 2018 · 1 comment

Comments

@arkanSoul
Copy link

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; } }

@shanielh
Copy link

Hi @arkanSoul, thanks for sending the issue, this repository is not maintained any more, I believe there are much better ways to create HTTP/s servers using .net core :

https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants