Permalink
Browse files

patch to response body length that uses correct byte length measure n…

…ot string length measure
  • Loading branch information...
thatcher
thatcher committed Jul 29, 2010
1 parent ac710b1 commit 6e407b84c0d5b25645fdbfc308877aa28820a58c
Binary file not shown.
@@ -260,9 +260,9 @@ public boolean processRequest(HttpServletRequest request, HttpServletResponse re
String body = Context.toString(
ScriptableObject.getProperty(res, "body")
);
- if(! (contentLength > -1) ){
+ //if(! (contentLength > -1) ){
contentLength = body.getBytes("UTF-8").length;
- }
+ //}
response.setContentLength(contentLength);
logger.debug("Actual Body Length ===> " + contentLength);
response.getWriter().println(body);
View
Binary file not shown.
View
Binary file not shown.

0 comments on commit 6e407b8

Please sign in to comment.