Push with localized SystemMessages

Hi,
I tried to localize the SystemMessages, but for example when session timeout happen the localized message displayed corretly but the next PUSH request displays another message with wrongly encoded characters.
I have created a
screen capture
for this.
I attach the sample projet, it can be started with mvn jetty:run

Do you have any suggestion what should I do to correct the character encoding or disable the second message?

When I use push with websocket transport this issue is not appears (the second message is displayed this time with correct encoding), but I can not use websocket transport because of other
issue
.

I use this simple code to localize SystemMessages:

    @WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
    @VaadinServletConfiguration(ui = MyUI.class, productionMode = false, heartbeatInterval=3, closeIdleSessions=true)
    public static class MyUIServlet extends VaadinServlet {
        @Override
        protected void servletInitialized() throws ServletException
        {
            super.servletInitialized();
            getService().setSystemMessagesProvider(new SystemMessagesProvider() {
                
                @Override
                public SystemMessages getSystemMessages(
                        SystemMessagesInfo systemMessagesInfo) {
                    CustomizedSystemMessages csm = new CustomizedSystemMessages();
                    
                    csm.setSessionExpiredCaption("Session expired - öüóőúéáűíÖÜÓŐÚÉÁŰÍ");
                    csm.setSessionExpiredMessage(csm.getSessionExpiredMessage() + "öüóőúéáűíÖÜÓŐÚÉÁŰÍ");
                    
                    return csm;
                }
            });
        }
    }

17950.gz (2.94 KB)

I have found a workaround but I don’t know what is its side effect:
In my custom VaadinServlet.service method before calling super(…) I set the response character encoding to UTF-8:

@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setCharacterEncoding("UTF-8"); super.service(request, response); } I do it because when it is not set the AthmosphereResponse.getCharacterEncoding() will return ISO-8859-1 and this is used in AtmosphereInterceptorWriter:

@Override public AsyncIOWriter write(AtmosphereResponse response, String data) throws IOException { return write(response, data.getBytes(response.getCharacterEncoding())); } Will it cause any unwanted side effect?