Community
Participate
Working Groups
Build Identifier: 9.0-20110318 I write a servet and deploy it to the jetty server(version:jetty-distribution-8.0.0.v20110901). when I access this servlet,the cpu rise to a high level and never going down. The servlet source is: public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); response.addHeader("Content-Length", "3"); out.println("abcde"); out.flush(); out.close(); } This issue would happen when I use println() method and the Content-Length value is less than the real bytes printed. Reproducible: Always Steps to Reproduce: 1.write a servlet using the code above 2.deploy the web project to jetty 3.using browser to access this servlet
Hi, I tested this against the latest release of jetty-8, which is 8.1.0.RC1 and this does not occur (any more). The HttpOutput.write method checks to see if the amount that is written is equal to the content length and closes if so, so it won't try and write more than that amount of data. regards Jan