Skip to content

Cookie names should be case-sensitive #78

Description

@zlondrej

rqCookies and Cookie records contains lowercase name of the cookie. But browsers treat the cookie names in case-sensitive manner.
It's easy for server to make the cookie lookup case-insensitive when cookies have correct letter cases by using lower, upper or any kind of case-insensitive comparison. But it's not possible to fill in the correct letter cases when the cookie name is lowercased.

The issue seems to stem from this line: https://github.com/Happstack/happstack-server/blob/master/src/Happstack/Server/Internal/Cookie.hs#L173

return $ Cookie ver path domain (low name) val False False SameSiteNoValue

Meanwhile, mkCookieHeader preserves the letter casing in the Set-Cookie header, which makes it more inconsistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions