Skip to content

Commit 3ba0d58

Browse files
committed
handle rack for redirects
1 parent 4be2e96 commit 3ba0d58

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/tinyrails.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ def call(_env)
2222

2323
controller = klass.new(_env)
2424
text = controller.send(act)
25-
[200, { 'content-type' => 'text/html' }, [text]]
25+
26+
if result.is_a?(Array) && result.length == 3 && result[0].is_a?(Integer)
27+
result
28+
else
29+
[200, { 'content-type' => 'text/html' }, [text]]
30+
end
31+
2632
rescue NameError => e
2733
no_controller_error(e)
2834
rescue NoMethodError => e

0 commit comments

Comments
 (0)