Skip to content

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

@devmonkey22

Description

@devmonkey22

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions