Skip to content

fix: Unexpected default rack.session#1093

Open
jgraichen wants to merge 1 commit intobblimke:masterfrom
jgraichen:fix/rack-session
Open

fix: Unexpected default rack.session#1093
jgraichen wants to merge 1 commit intobblimke:masterfrom
jgraichen:fix/rack-session

Conversation

@jgraichen
Copy link
Copy Markdown

Some rack applications fail when the rack.session is already initialized, but with an unexpected value. For example, in a Rails API-only application, unexpected behavior is triggered when a rack.session is present.

This PR changes webmock, not to set a rack.session at all, similar to how web servers do not set a session. The application or a middleware sets them up if needed.

Fixes #985

Some rack applications fail when the `rack.session` is already initialized,
but with an unexpected value. For example, in a Rails API-only application,
unexpected behavior is triggered when a `rack.session` is present.

This commit changes webmock, not to set a `rack.session` at all, similar
to how web servers do not set a session. The application or a middleware
sets them up if needed.

Fixes bblimke#985
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

Successfully merging this pull request may close these issues.

Setting rack.session to hash by default when using to_rack

1 participant