diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-07 04:20:20 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-07 04:20:20 +0000 |
commit | db885e81b9dc918a75bd66b1631a13e10447d0ff (patch) | |
tree | 5f2c1f5f10e4769340f52db747f5f0369dd2f7f7 /actionpack/lib/action_controller | |
parent | 2766f7629f318f0f7dadf2286113504113fef562 (diff) | |
download | rails-db885e81b9dc918a75bd66b1631a13e10447d0ff.tar.gz rails-db885e81b9dc918a75bd66b1631a13e10447d0ff.tar.bz2 rails-db885e81b9dc918a75bd66b1631a13e10447d0ff.zip |
Ignore illegal seeks on body rewind. Catches CGI errors depending on your httpd. Closes #10404 [Curtis Hawthorne]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-x | actionpack/lib/action_controller/request.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index a3eac357f7..785f6d424a 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -588,7 +588,13 @@ module ActionController end raise EOFError, "bad boundary end of body part" unless boundary_end=~/--/ - body.rewind if body.respond_to?(:rewind) + begin + body.rewind if body.respond_to?(:rewind) + rescue Errno::ESPIPE + # Handles exceptions raised by input streams that cannot be rewound + # such as when using plain CGI under Apache + end + params end end |