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

Session keys should be case-INsensitive to match default ASP.NET behavior, or at least configurable #20

Open
devmonkey22 opened this issue Oct 8, 2015 · 1 comment

Comments

@devmonkey22
Copy link
Contributor

When switching from StateServer to RedisSessionProvider, I found that you're handling session keys case-sensitively, because you're using the default ConcurrentDictionary IStringEquality behavior.

MSDN docs don't specify, but at least based on Internet discussions: http://stackoverflow.com/questions/1731283/net-httpsessionstate-case-insensitivity that to match classic ASP behavior, session keys along with other ASP.NET collections are case-insensitive.

To fix, all constructors need the following:

this.Items = new ConcurrentDictionary<string, object>(concLevel, numItems, StringComparer.InvariantCultureIgnoreCase);
this.SerializedRawData = new ConcurrentDictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
@hmvs
Copy link

hmvs commented Jan 21, 2016

Seems this commit is merged. Could you please close the ticket and publish new version to the Nuget?

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