http://codereview.appspot.com/186278/diff/1/2 File java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java (right):
http://codereview.appspot.com/186278/diff/1/2#newcode119 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java:119: encoding = "UTF-8"; On 2010/01/22 18:16:57, beaton wrote:
Why would we ever receive a request that was not UTF-8 encoded?
From the HttpServletRequest javadoc: Returns the name of the character encoding used in the body of this request. This method returns null if the request does not specify a character encoding http://codereview.appspot.com/186278/diff/1/2#newcode129 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java:129: req.setPostBody(getParameter(request, POST_DATA_PARAM, "").getBytes(encoding)); On 2010/01/22 18:16:57, beaton wrote:
paul lindner ran into nasty performance problems with code like this:
http://paul.vox.com/library/post/the-mysteries-of-java-character-set-performance.html If the other character set is only used sporadically, then yes, you'll be okay. Since most sites will tend to stick with one or the other character set this should be okay. Id recommend passing the charset value through a toUpperCase to reduce variance though... http://codereview.appspot.com/186278/show

