aboutsummaryrefslogtreecommitdiff
path: root/juick-ws
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-12-16 15:41:14 +0300
committerGravatar Vitaly Takmazov2016-12-16 15:41:14 +0300
commit300a0439b2a6e26d9025247ef780c886616d4ae1 (patch)
treebcdb7613c2c5f37b870cbe18241894dba9428fae /juick-ws
parent18a8595d2150edc92084c94b9dbb8f4309d3ed36 (diff)
CharEncoding.UTF_8
Diffstat (limited to 'juick-ws')
-rw-r--r--juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java3
-rw-r--r--juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java b/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java
index 85f936b5..c73c50e5 100644
--- a/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java
+++ b/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java
@@ -3,6 +3,7 @@ package com.juick.ws;
import com.juick.User;
import com.juick.service.MessagesService;
import com.juick.service.UserService;
+import org.apache.commons.lang3.CharEncoding;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.http.NameValuePair;
import org.apache.http.client.utils.URLEncodedUtils;
@@ -45,7 +46,7 @@ public class WebsocketComponent extends TextWebSocketHandler {
// Auth
User visitor = new User();
- List<NameValuePair> params = URLEncodedUtils.parse(hLocation, "UTF-8");
+ List<NameValuePair> params = URLEncodedUtils.parse(hLocation, CharEncoding.UTF_8);
for (NameValuePair param : params) {
if (param.getName().equals("hash")) {
String hash = param.getValue();
diff --git a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java
index 6feea4c7..ed6b1069 100644
--- a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java
+++ b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketInitializer.java
@@ -1,6 +1,7 @@
package com.juick.ws.configuration;
import com.juick.configuration.DataConfiguration;
+import org.apache.commons.lang3.CharEncoding;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
@@ -28,7 +29,7 @@ public class WebsocketInitializer extends AbstractAnnotationConfigDispatcherServ
@Override
protected Filter[] getServletFilters() {
- return new Filter[]{new CharacterEncodingFilter("UTF-8")};
+ return new Filter[]{new CharacterEncodingFilter(CharEncoding.UTF_8)};
}
@Override