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

Webrick handler tries to modify frozen strings with the latest webrick gem #2030

Closed
Fjan opened this issue Jan 27, 2023 · 3 comments
Closed

Comments

@Fjan
Copy link

Fjan commented Jan 27, 2023

The version of webrick that was released today now has frozen strings (ruby/webrick@9279dd8). This causes an exception when using webrick with rack:

ERROR FrozenError: can't modify frozen String: ""
/ruby-3.1.2/gems/rack-2.2.6.2/lib/rack/handler/webrick.rb:120:in `block in service'

(I think the offending code on that line is res.body << part, it can perhaps simply be replaced by res.body += part but I don't know enough about what's going on there)

@ioquatix
Copy link
Member

It's fixed in ruby/webrick#103 and I hope to release it soon.

@ioquatix
Copy link
Member

Okay, it was just released in webrick v1.8.1.

@Fjan
Copy link
Author

Fjan commented Jan 27, 2023

Thanks @ioquatix !

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

No branches or pull requests

2 participants