feat: Rack 3.x and Rails 8.1+ support - #325
Merged
Merged
Conversation
chadlwilson
force-pushed
the
rack-3-upgrade
branch
from
August 30, 2025 12:23
5da0514 to
9b01b6a
Compare
kares
reviewed
Sep 2, 2025
kares
left a comment
Member
There was a problem hiding this comment.
nice attempt to support both versions, seems maintainable...
chadlwilson
force-pushed
the
rack-3-upgrade
branch
2 times, most recently
from
September 6, 2025 10:42
52944a0 to
c4cd00e
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
2 times, most recently
from
September 25, 2025 18:03
6279ba8 to
c5a7a6e
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
3 times, most recently
from
October 11, 2025 06:01
0b70f23 to
196095b
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
from
October 16, 2025 06:48
196095b to
a8f9f1a
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
2 times, most recently
from
October 27, 2025 17:32
5f1d489 to
b63259a
Compare
chadlwilson
commented
Oct 27, 2025
chadlwilson
force-pushed
the
rack-3-upgrade
branch
from
October 27, 2025 18:58
b63259a to
c622ca7
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
from
November 7, 2025 09:50
c622ca7 to
1a8458b
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
from
November 16, 2025 18:35
1a8458b to
b464158
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
from
February 6, 2026 15:08
b464158 to
17cc11d
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
2 times, most recently
from
March 5, 2026 04:21
df4109d to
476247d
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
3 times, most recently
from
April 21, 2026 16:42
309c7e7 to
82c16bf
Compare
2 tasks
chadlwilson
force-pushed
the
rack-3-upgrade
branch
8 times, most recently
from
September 8, 2026 08:19
0bf8159 to
b188eac
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
2 times, most recently
from
September 8, 2026 13:13
ff187f6 to
2063d6b
Compare
chadlwilson
force-pushed
the
rack-3-upgrade
branch
4 times, most recently
from
September 8, 2026 15:09
b06caed to
3f56596
Compare
Rack 3.x allows any header value to be an Array of Strings. The Content-Type/Content-Length/Transfer-Encoding special cases coerced the value directly (asJavaString/to_i) and raised on Arrays - now a single value Array is unwrapped, and multi value Arrays take the generic addHeader-per-element path instead of erroring. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DefaultEnv used HttpServletRequest#getHeader which only returns the first value of a repeated header, dropping e.g. X-Forwarded-For hops. All values are now joined with ', ' (and Cookie headers re-combined with '; ' per RFC 6265 / RFC 7540), falling back to getHeader for containers restricting getHeaders access. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The newline-splitting header write path called chomp! on each yielded value - a frozen String ending in a newline raised FrozenError, and non-frozen app-owned header values were being modified in place. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…upport Replace the earlier non-compliant "unofficial extension" implementation with proper support.
chadlwilson
force-pushed
the
rack-3-upgrade
branch
from
September 8, 2026 15:50
3f56596 to
c8aeff2
Compare
chadlwilson
marked this pull request as ready for review
September 8, 2026 15:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements spec compatibility with Rack 3.0 through 3.2.
https://github.com/rack/rack/blob/main/UPGRADE-GUIDE.md
https://github.com/rack/rack/blob/main/SPEC.rdoc
2.2support#callstreams (sanity test in the Sinatra example)TODO list
rack-sessionalso?rackup? Or rely on Rails/frameworks to bring them in?HeaderHashwrapper for error app has any effect on Rack 2.2#callsupport needed?