<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Bitstream Vera Sans Mono">Mongrel's tempfile generation on
win32 is broken meaning large files can't be uploaded.<br>
<br>
</font><font face="Bitstream Vera Sans Mono">On line 198 of mongrel.rb
(0.13.3) HttpRequest#initialize the tempfile function is called:</font><br>
<font face="Bitstream Vera Sans Mono"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if clen &gt; Const::MAX_BODY</font><br>
<font face="Bitstream Vera Sans Mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>@body =
Tempfile.new(self.class.name)</b></font><br>
<font face="Bitstream Vera Sans Mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @body.binmode</font><br>
<font face="Bitstream Vera Sans Mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>
<br>
</font><font face="Bitstream Vera Sans Mono">Unfortunately this also
includes the module name as the example shows:<br>
<br>
<b>Mongrel::HttpRequest2496.9</b><br>
<br>
Win32 doesn't allow the ':' character in file names so this fails.<br>
<br>
I just solved the problem by replacing<br>
<br>
<b>self.class.name</b> <br>
<br>
with<br>
<br>
<b>self.class.name.split('::').last<br>
<br>
</b>Cheers,<br>
Josh Ferguson<br>
</font>
</body>
</html>