Patrik Ragnarsson
Patrik Ragnarsson
jruby head worked fine here https://github.com/sinatra/sinatra/actions/runs/11936860840/job/33271496598 `jruby 9.4.10.0-SNAPSHOT (3.1.4) 2024-11-19 fe763ca666 OpenJDK 64-Bit Server VM 11.0.25+9 on 11.0.25+9 +jit [x86_64-linux]`
> The current implementation sets the body, and adds a content-type header, but the rest of the response is from user code, which could lead to some pretty wild behaviour....
I'm going with the more conservative approach (https://github.com/sinatra/sinatra/pull/2035/commits/b25a84eedd4866132e6decd1be1acc2bd038d494) to start with but these changes are probably the way to go, just want to understand them more.
I may never release that, mostly want to get CI green, so it is easier to work with contributions.
> Regarding the specific test that was failing, in `error_block!`, it looks like this is assigning to the body and header, but honestly, this should probably just return a completely...
If the error handler uses a fixed set of headers (no session cookie for example), user isn't logged in on the 404 response?
(I guess I should try things not just speculate...)
> I don't think that's a correct interpretation of how session management would work. > > I think you are assuming that some kind of session state must be part...
> Can't both `Iterator` and `BaseIterator` be returned? I think the conservative approach looks extremely fragile. Looks OK? ```ruby # irb -rrack irb(main):001> Rack::RELEASE => "3.1.8" irb(main):002> Rack::Files::Iterator.new(nil, nil, nil).is_a?(Rack::Files::BaseIterator)...