Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Rewrite Middleware without sinatra #16

Merged
merged 2 commits into from
Jul 26, 2024
Merged

Conversation

danbernier
Copy link
Contributor

No description provided.

@danbernier danbernier requested a review from benburkert July 26, 2024 22:01
@danbernier danbernier force-pushed the middleware-wo-sinatra branch from 4830158 to 3415b33 Compare July 26, 2024 22:05
@danbernier danbernier force-pushed the middleware-wo-sinatra branch from 3415b33 to 9e16680 Compare July 26, 2024 22:08

super(app)
def call(env)
dup._call(env)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why dup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because rack middleware isn't threadsafe, and ivars leak across threads.

@danbernier danbernier merged commit 943bdd9 into main Jul 26, 2024
5 of 6 checks passed
@danbernier danbernier deleted the middleware-wo-sinatra branch July 26, 2024 22:26
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.

2 participants