I actually opened a report for this on Rubyforge, but I realized
that I often forget about that on my projects, as well.
http://rubyforge.org/tracker/index.php?func=detail&aid=22346&group_id=3113&atid=12001
lib/rack/request.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/rack/request.rb b/lib/rack/request.rb
index 9d16f49..2cf1944 100644
--- a/lib/rack/request.rb
+++ b/lib/rack/request.rb
@@ -122,7 +122,7 @@ module Rack
# The union of GET and POST data.
def params
- self.GET.update(self.POST)
+ self.put? ? self.GET : self.GET.update(self.POST)
rescue EOFError => e
self.GET
end
--
Eric Wong
> Uploading a large file via the HTTP PUT method causes
> `@env["rack.input"].read' to be called inside the POST method. This
> means the entire file is slurped into memory and was needlessly causing
> my Sinatra process to eat up 300M+ for some uploads I've been doing.
> ---
>
> I actually opened a report for this on Rubyforge, but I realized
> that I often forget about that on my projects, as well.
Your patch breaks all POST uploads, doesn't it?
If you use a proper multipart (NOT url-encoded!) it should use a tempfile...
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org
> Is there any update on this patch? This problem is biting me right
> now and I'd really like to see it resolved :)
Applied now, I misunderstood the patch.