Please sign in to comment.
Bug fix for Tempfile POST bodies under Ruby 1.8
The Tempfile class in Ruby 1.8 doesn't implement the == method correctly. This causes Rack::Requests to re-parse the input (when the input is a Tempfile) each time the POST method is called, this in turn raises an EOFError because the input has already been read. One example of when this happens is when handling large POST requests (e.g. file uploads) under Mongrel. This issue only effects Ruby 1.8 (tested against 1.8.6). Ruby 1.9 does not suffer from this issue (presumably due to changes in the Delegate implementation.) darcs-hash:20080327110953-ea3b8-44b6f22da80c9dae70dcd61adc43111547371daf.gz
- Loading branch information...
Showing with 23 additions and 1 deletion.