aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Main.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-01-28 22:11:52 +0700
committerGravatar Ugnich Anton2014-01-28 22:11:52 +0700
commit45bc7349af0696b9c68266feece63d7359260cec (patch)
tree9936534e57a52568566166f7e59a7519abe11a66 /src/java/com/juick/http/www/Main.java
parent36c8ec33c09fbfd0f82a5a4121ef63ed1ec77457 (diff)
post setCharacterEncoding
Diffstat (limited to 'src/java/com/juick/http/www/Main.java')
-rw-r--r--src/java/com/juick/http/www/Main.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/java/com/juick/http/www/Main.java b/src/java/com/juick/http/www/Main.java
index 59065341..47b94387 100644
--- a/src/java/com/juick/http/www/Main.java
+++ b/src/java/com/juick/http/www/Main.java
@@ -262,6 +262,10 @@ public class Main extends HttpServlet implements Stream.StreamListener {
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ if (request.getCharacterEncoding() == null) {
+ request.setCharacterEncoding("UTF-8");
+ }
+
String uri = request.getRequestURI();
if (uri.equals("/post")) {
pagesNewMessage.doPostNewMessage(sql, request, response);