Mongrel''s tempfile generation on win32 is broken meaning large files can''t be uploaded. On line 198 of mongrel.rb (0.13.3) HttpRequest#initialize the tempfile function is called: if clen > Const::MAX_BODY @body Tempfile.new(self.class.name) @body.binmode else Unfortunately this also includes the module name as the example shows: Mongrel::HttpRequest2496.9 Win32 doesn''t allow the '':'' character in file names so this fails. I just solved the problem by replacing self.class.name with self.class.name.split(''::'').last Cheers, Josh Ferguson
On 5/30/06, Josh Ferguson <josh at besquared.net> wrote:> > Mongrel''s tempfile generation on win32 is broken meaning large files can''t > be uploaded. > > On line 198 of mongrel.rb (0.13.3) HttpRequest#initialize the tempfile > function is called: > > if clen > Const::MAX_BODY > @body = Tempfile.new(self.class.name) > @body.binmode > else > > Unfortunately this also includes the module name as the example shows: > > Mongrel::HttpRequest2496.9 > > Win32 doesn''t allow the '':'' character in file names so this fails. > > I just solved the problem by replacing > > self.class.name > > with > > self.class.name.split(''::'').last > > Cheers, > Josh Ferguson >Josh, thank you for the bug, this was already checked into SVN. But still isn''t released (nor in the beta gem). My guess is that Zed will release 0.3.13 during this week. Regards, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi
On Tue, 2006-05-30 at 01:33 -0400, Josh Ferguson wrote:> Mongrel''s tempfile generation on win32 is broken meaning large files > can''t be uploaded. > > On line 198 of mongrel.rb (0.13.3) HttpRequest#initialize the tempfile > function is called: > > if clen > Const::MAX_BODY > @body = Tempfile.new(self.class.name) > @body.binmodeLooks like the way tempfiles are made is pretty irregular. I just fixed this under win32 using cygwin. When I get the regular ruby one-click installed i''ll test it there. Also fixed up a few other annoying things related to win32. Anyway, I''ll be pumping out a release later tonight that will include a win32 gem as well. Stay tuned and be ready to test. Zed