Skip to content
This repository was archived by the owner on Jan 16, 2023. It is now read-only.
This repository was archived by the owner on Jan 16, 2023. It is now read-only.

Only set cookies in the response if the session data has changed #12

@jtgeibel

Description

@jtgeibel

This will help resolve an issue observed in production crates.io. My proposal is to change session() to return a shared reference, and add a session_mut() providing mutable access. Calling session_mut() will set a a possibly_modified: bool flag. If no call to session_mut() has been made, then the session has not been modified and it is not necessary to add the Set-Cookie header to the response.

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