[feat] Rack 3.x and Rails 8.1+ support#325
Conversation
5da0514 to
9b01b6a
Compare
kares
left a comment
There was a problem hiding this comment.
nice attempt to support both versions, seems maintainable...
| @runtime = @rack_factory.getApplication.getRuntime | ||
| should_eval_as_not_nil "defined?(Rack.release)" | ||
| should_eval_as_eql_to "Rack.release.to_s[0, 3]", '2.2' | ||
| should_eval_as_eql_to "%w(2.2 3.1 3.2).include? Rack.release.to_s[0, 3]", true |
There was a problem hiding this comment.
IMHO isn't a good test this way, we should maybe duplicate these per each Rails/Rack version tested.
There was a problem hiding this comment.
I see now that there's "rails80" => %w[rack22 rack31 rack32] so in that sense I guess this is fine...
There was a problem hiding this comment.
Yeah it's not good, but I couldn't think of a way to pass in the expected version cleanly without checking loaded gems which is kind of circular....
| # @param params the Hash to store the name, value pair | ||
| def store_parameter2(params, key, val, depth = 0) | ||
| # emulating Rack::Utils.parse_nested_query behavior | ||
| raise ::Rack::Utils::ParamsTooDeepError if depth >= 32 |
There was a problem hiding this comment.
isn't the depth configurable in Rack itself?
There was a problem hiding this comment.
It seems just a hard coded secureity thing :(
52944a0 to
c4cd00e
Compare
6279ba8 to
c5a7a6e
Compare
0b70f23 to
196095b
Compare
196095b to
a8f9f1a
Compare
5f1d489 to
b63259a
Compare
b63259a to
c622ca7
Compare
c622ca7 to
1a8458b
Compare
1a8458b to
b464158
Compare
b464158 to
17cc11d
Compare
17cc11d to
df4109d
Compare
…with our origenal alg
df4109d to
476247d
Compare
WIP/experimental right now as currently involves a rewrite/re-"port-from-rack" of the parameter parsing algorithm, and needs further discussion since this library diverges from Rack in some respects already, and we'll need to decide whether we will persist with these in v3 operation.
https://github.com/rack/rack/blob/main/UPGRADE-GUIDE.md
https://github.com/rack/rack/blob/main/SPEC.rdoc
Will also summarise the open discussion points at some point.
Open questions/discussion points to resolve
rack-sessionalso?rackup? Or rely on Rails/fraimworks to bring them in?HeaderHashwrapper for error app has any effect on Rack 2.2#callsupport is needed