Commit c55e07de authored by Ben Vinson's avatar Ben Vinson Committed by benv

Use upper-case 'UTF-8' for character encodings to reduce lock contention

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@11929 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3ffa39da
......@@ -356,7 +356,7 @@ public class HttpBindServlet extends HttpServlet {
throws IOException {
response.setStatus(HttpServletResponse.SC_OK);
response.setContentType("GET".equals(method) ? "text/javascript" : "text/xml");
response.setCharacterEncoding("utf-8");
response.setCharacterEncoding("UTF-8");
if ("GET".equals(method)) {
if (JiveGlobals.getBooleanProperty("xmpp.httpbind.client.no-cache.enabled", true)) {
......@@ -371,7 +371,7 @@ public class HttpBindServlet extends HttpServlet {
if (JiveGlobals.getBooleanProperty("log.httpbind.enabled", false)) {
System.out.println(new Date()+": HTTP SENT(" + session.getStreamID().getID() + "): " + content);
}
byte[] byteContent = content.getBytes("utf-8");
byte[] byteContent = content.getBytes("UTF-8");
response.setContentLength(byteContent.length);
response.getOutputStream().write(byteContent);
response.getOutputStream().close();
......@@ -421,6 +421,6 @@ public class HttpBindServlet extends HttpServlet {
private Document createDocument(InputStream request) throws
DocumentException, IOException, XmlPullParserException
{
return getPacketReader().read("utf-8", request);
return getPacketReader().read("UTF-8", request);
}
}
......@@ -244,7 +244,7 @@ public class WebDAVLiteServlet extends HttpServlet {
// File listing
response.setStatus(HttpServletResponse.SC_OK);
response.setContentType("text/plain");
response.setCharacterEncoding("utf-8");
response.setCharacterEncoding("UTF-8");
String content = "Files available for "+room+"@"+service+":\n";
File fileDir = getFileReference(service, room, null);
Log.debug("WebDAVListServlet: File path = "+fileDir.getAbsolutePath());
......
......@@ -368,7 +368,7 @@ public class StringUtils {
*/
public static String hash(String data, String algorithm) {
try {
return hash(data.getBytes("utf-8"), algorithm);
return hash(data.getBytes("UTF-8"), algorithm);
}
catch (UnsupportedEncodingException e) {
Log.error(e.getMessage(), e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment