Review Board 1.7.22


Fixed snippet display as UTF-8, issue WAVE-246

Review Request #2423 - Created Oct. 18, 2011 and submitted

Vicente J. Ruiz Jurado
Reviewers
yurize
wave
Some minor fix that solves 
https://issues.apache.org/jira/browse/WAVE-246
Run the server, create some wave with Cyrillic title or text.

Diff revision 1 (Latest)

  1. /src/org/waveprotocol/box/server/rpc/SearchServlet.java: Loading...
/src/org/waveprotocol/box/server/rpc/SearchServlet.java
Revision 1183087 New Change
[20] 213 lines
[+20] [+] private SearchResponse performSearch(SearchRequest searchRequest, ParticipantId user) {
214
      throws IOException {
214
      throws IOException {
215
    if (message == null) {
215
    if (message == null) {
216
      resp.sendError(HttpServletResponse.SC_FORBIDDEN);
216
      resp.sendError(HttpServletResponse.SC_FORBIDDEN);
217
    } else {
217
    } else {
218
      resp.setStatus(HttpServletResponse.SC_OK);
218
      resp.setStatus(HttpServletResponse.SC_OK);
219
      resp.setContentType("application/json");
219
      resp.setContentType("application/json; charset=utf8");
220
      // This is to make sure the fetched data is fresh - since the w3c spec
220
      // This is to make sure the fetched data is fresh - since the w3c spec
221
      // is rarely respected.
221
      // is rarely respected.
222
      resp.setHeader("Cache-Control", "no-store");
222
      resp.setHeader("Cache-Control", "no-store");
223
      try {
223
      try {
224
        resp.getWriter().append(serializer.toJson(message).toString());
224
        resp.getWriter().append(serializer.toJson(message).toString());
225
      } catch (SerializationException e) {
225
      } catch (SerializationException e) {
226
        throw new IOException(e);
226
        throw new IOException(e);
227
      }
227
      }
228
    }
228
    }
229
  }
229
  }
230
}
230
}
  1. /src/org/waveprotocol/box/server/rpc/SearchServlet.java: Loading...