diff options
author | Go MAEDA <maeda@farend.jp> | 2021-05-11 05:35:19 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-05-11 05:35:19 +0000 |
commit | 6369d139dd1697a582daf102bdc7edc0101718b4 (patch) | |
tree | eb6712962faf95b7bdf2586d5ef0eb610289c036 /config/initializers | |
parent | 49e323ae7af2998fc2785319643a9ac5bc93c425 (diff) | |
download | redmine-6369d139dd1697a582daf102bdc7edc0101718b4.tar.gz redmine-6369d139dd1697a582daf102bdc7edc0101718b4.zip |
Uploading a big file fails with NoMemoryError (#33752).
Patch by Karel Pičman and Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@20993 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/10-patches.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index cc6113d48..643d06b7e 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -215,3 +215,17 @@ module ActionView end end end + +# https://github.com/rack/rack/pull/1703 +# TODO: remove this when Rack is updated to 3.0.0 +require 'rack' +module Rack + class RewindableInput + unless method_defined?(:size) + def size + make_rewindable unless @rewindable_io + @rewindable_io.size + end + end + end +end |