Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Unexpected default rack.session #1093

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jgraichen
Copy link

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
# for free to join this conversation on GitHub. Already have an account? # 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