Am 22.01.2015 um 00:51 schrieb Rémy Maucherat:
2015-01-21 23:47 GMT+01:00 Christopher Schultz <ch...@christopherschultz.net
:
To wit:
1. org.apache.catalina.servlets.DefaultServlet.Range.validate modifies
the value of the "end" member. That seems ... odd.
2. copyRange(InputStream, ServletOutputStream) returns IOException
instead of throwing it. There is one call to copyRange() that always
ignores this return value, even if it is a non-null IOException object.
3. executePartialPut(HttpServletRequest, Range, String) has a potential
resource leak of bufOldRevStream.
I'm not well-versed in the DefaultServlet to know if 1 and 2 are
legitimate, but they definitely smell funny. The resource issue in #3
should probably be fixed, and I'm happy to provide a fix for it.
Yes, it would be a good idea to be careful with 1 and 2.
I came along issue 2 while looking at a resource leak identified by
coverity scan in getReadme, which is the one method, which ignores the
returned exception. The comments in the other methods seem to indicate,
that a try/finally block plus a conversion to throwing the exception
instead of returning it in copyRange would be appropriate.
Regards
Felix
I don't remember reading that article, but maybe I forgot.
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org