You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Yoav Shapira <yo...@apache.org> on 2006/12/25 14:34:12 UTC

Please review the fix I just committed to Bugzilla 40326

http://issues.apache.org/bugzilla/show_bug.cgi?id=40326 points out
that DefaultServlet uses File#deleteOnExit which is indeed evil.  I
took a look at the code, it seemed like a simple alternative was
available, so I went ahead and made the change.  However, I'm not an
expert on HTTP partial PUTs, which are the only chunk of Tomcat code
that would be affected by this fix, so I'm not sure my limited local
testing is adequate.  If someone else wants to review and/or test this
fix, that'd be awesome.

Yoav

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Please review the fix I just committed to Bugzilla 40326

Posted by Mark Thomas <ma...@apache.org>.
Yoav Shapira wrote:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=40326 points out
> that DefaultServlet uses File#deleteOnExit which is indeed evil.  I
> took a look at the code, it seemed like a simple alternative was
> available, so I went ahead and made the change.  However, I'm not an
> expert on HTTP partial PUTs, which are the only chunk of Tomcat code
> that would be affected by this fix, so I'm not sure my limited local
> testing is adequate.  If someone else wants to review and/or test this
> fix, that'd be awesome.
> 
> Yoav

I haven't tested it but I have looked through the code. It will be
slower on partial PUTs since the temp file is re-created every time
but logically that is the price you have to pay to avoid a memory
'leak' from deleteOnExit() not to mention eventually filling up the
server with temporary files.

Looks good to me +1

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org