Zed Shaw
2006-Apr-19 02:30 UTC
[Mongrel] Mongrel 0.3.12.5 -- Pre-Release with File Upload whyness
I''ve got a Mongrel 0.3.12.5 pre-release in the releases directory I''d like people to try out: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ This release incorporates why''s changes to allow for uploading files much more efficiently and for streaming out files via a HttpResponse.send_file call. I re-wrote the file upload part what why created to refactor that whole process. It now handles quite a few corner cases related to efficient file uploads: * Writes to a Tempfile if greater than 92k. * Deletes the Tempfile if the user aborts the upload (closed socket). * Detects when not enough was uploaded to match the reported Content-length * Simplifies the upload chunking logic so there''s the same socket read loop whether you''re uploading a large or small file. The *only* thing that I haven''t got quite right is that it seems to leak the Tempfile objects (and thus the files). They stay around after the uploads so I''ve got to work out whether deleting them is safe or not. Anyway, try the stuff out, especially with something like Park Place and report any bugs you find. Zed
Rick Olson
2006-Apr-19 05:52 UTC
[Mongrel] Mongrel 0.3.12.5 -- Pre-Release with File Upload whyness
On 4/18/06, Zed Shaw <zedshaw at zedshaw.com> wrote:> I''ve got a Mongrel 0.3.12.5 pre-release in the releases directory I''d like > people to try out: > > gem install mongrel --source=http://mongrel.rubyforge.org/releases/I just tried out the new mongrel release on my rails app, and the memory didnt go up more than 200k on an 800MB file. That is a massive improvement from the current release on rubyforge. I''m not seeing it in Camping, however. I built a gem from the latest camping from svn, but it still eats up my memory. -- Rick Olson http://techno-weenie.net
why the lucky stiff
2006-Apr-19 23:28 UTC
[Mongrel] Mongrel 0.3.12.5 -- Pre-Release with File Upload whyness
Zed Shaw wrote:> I''ve got a Mongrel 0.3.12.5 pre-release in the releases directory I''d like > people to try out: > > gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > > This release incorporates why''s changes to allow for uploading files much > more efficiently and for streaming out files via a HttpResponse.send_file > call. >I found a couple bugs and dabbed some ointment on them. Please re-release. I''ve also got Camping gems out which work better with streaming HTTP. gem install camping --source code.whytheluckystiff.net _why
Zed Shaw
2006-Apr-20 04:51 UTC
[Mongrel] Mongrel 0.3.12.5 -- Pre-Release with File Upload whyness
Crap, I forgot to check the last change in and now there''s a nasty conflict. On 4/19/06 7:28 PM, "why the lucky stiff" <why at ruby-lang.org> wrote:> Zed Shaw wrote: >> I''ve got a Mongrel 0.3.12.5 pre-release in the releases directory I''d like >> people to try out: >> >> gem install mongrel --source=http://mongrel.rubyforge.org/releases/ >> >> This release incorporates why''s changes to allow for uploading files much >> more efficiently and for streaming out files via a HttpResponse.send_file >> call. >> > I found a couple bugs and dabbed some ointment on them. Please > re-release. I''ve also got Camping gems out which work better with > streaming HTTP. > > gem install camping --source code.whytheluckystiff.net > > _why > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users
Zed Shaw
2006-Apr-20 04:57 UTC
[Mongrel] Mongrel 0.3.12.5 -- Pre-Release with File Upload whyness
Alright why, please update your code and take a look. It shouldn''t have the bug you reported as it''s completely different. Zed On 4/19/06 7:28 PM, "why the lucky stiff" <why at ruby-lang.org> wrote:> Zed Shaw wrote: >> I''ve got a Mongrel 0.3.12.5 pre-release in the releases directory I''d like >> people to try out: >> >> gem install mongrel --source=http://mongrel.rubyforge.org/releases/ >> >> This release incorporates why''s changes to allow for uploading files much >> more efficiently and for streaming out files via a HttpResponse.send_file >> call. >> > I found a couple bugs and dabbed some ointment on them. Please > re-release. I''ve also got Camping gems out which work better with > streaming HTTP. > > gem install camping --source code.whytheluckystiff.net > > _why > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users