----- Original Message -----
Subject: Re: [Resin-interest] JNI timeout on multipart forms in 4.0.28
Date: Thu, 14 Jun 2012 10:26:12 -0700
From: Scott Ferguson <f...@caucho.com>

On 06/14/2012 08:21 AM, Mattias Jiderhamn wrote:
> I'm really glad Resin 4.0.28 is here since it resolves multiple issues
> we've been having lately. However, it seems a new critical issue may
> have been introduced since 4.0.25.

I've filed this as http://bugs.caucho.com/view.php?id=5120

Is it possible that this code is from a forward? I just closed a bug
where a forwarded form would try to double-read the content.

Otherwise, this looks new.

If you can create a tiny example POST that triggers the problem and send
it, that should help track it down.

I can recreate this quite easily, without any forwards. All that is needed is a large enough (> 75 parts) form.

Might be worth noting: If you press Stop in the browser, the server side execution coninues normally. Otherwise it times out after 120 seconds.

Example (posted in Mantis as well):
JSP:
<html><body>
<form action="/multipart" method="post" enctype="multipart/form-data">
<%-- 76 fails, 75 is ok --%>
<c:forEach begin="1" end="76" var="i">
      ${i}: <input type="text" name="just_some_field_${i}" value="foo" />
<br />
</c:forEach>
<input type="submit" value="Submit" />
</form>
</body></html>

Servlet:
@MultipartConfig(fileSizeThreshold = 1024 * 1024, maxRequestSize = 100 * 1024 * 1024)
public class MultipartServlet extends HttpServlet {
  @Override
protected void service(HttpServletRequest request, HttpServletResponse res) throws ServletException, IOException {
    System.out.println("Content length: " + request.getContentLength());
    final long start = System.currentTimeMillis();
    try {
      System.out.println("Getting parts ...");
      final Collection<Part> parts = request.getParts();
      System.out.println("No of parts: " + parts.size());
    }
    finally {
System.out.println("Done trying to parse; took " + (System.currentTimeMillis() - start) + " ms");
    }
  }
}


</Mattias>
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to