StripesFramework / stripes

Stripes is a Java framework with the goal of making Servlet/JSP based web development in Java as easy, intuitive and straight-forward as it should be. It's stripey and it doesn't suck.
http://www.stripesframework.org/
172 stars 72 forks source link

Fix for STS-912 #64

Open 9Ofbeapyia opened 7 years ago

9Ofbeapyia commented 7 years ago

This pull request should fix STS-912.

We ran into the bug on Weblogic 12 and I invested some time to investigate and fix this issue. For better testing I moved the inner class MyServletOutputStream.

The reason for the bug is, that for some reason bbuf.remaining() is returning 0 and so the for loop ends up in an infinity loop. This is somehow connected to characters with code < 0, because only with those characters I was able to reproduce this and only for some numbers of special characters, that's why there are tests for 632 and 633 of those characters.

The only real change is in MyServletOutputStream.write.