set request encoding

This commit is contained in:
zzz
2016-02-17 14:13:58 +00:00
parent 8498d7d128
commit 8faafc00b0
3 changed files with 6 additions and 0 deletions

View File

@@ -99,6 +99,8 @@ public class IdenticonServlet extends HttpServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if (request.getCharacterEncoding() == null)
request.setCharacterEncoding("UTF-8");
String codeParam = request.getParameter(PARAM_IDENTICON_CODE_SHORT);
boolean codeSpecified = codeParam != null && codeParam.length() > 0;
if (!codeSpecified) {

View File

@@ -100,6 +100,8 @@ public class QRServlet extends HttpServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if (request.getCharacterEncoding() == null)
request.setCharacterEncoding("UTF-8");
String codeParam = request.getParameter(PARAM_IDENTICON_CODE_SHORT);
boolean codeSpecified = codeParam != null && codeParam.length() > 0;
if (!codeSpecified) {

View File

@@ -33,6 +33,8 @@ public class RandomArtServlet extends HttpServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if (request.getCharacterEncoding() == null)
request.setCharacterEncoding("UTF-8");
String codeParam = request.getParameter(PARAM_IDENTICON_CODE_SHORT);
boolean codeSpecified = codeParam != null && codeParam.length() > 0;
if (!codeSpecified) {