Skip to content

Commit

Permalink
Make OpenAPI servlet serve UTF-8 encoded content
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Apr 9, 2019
1 parent 0dab444 commit 760adaf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws Se
String oai = getCachedOaiString(format);

addCorsResponseHeaders(resp);
resp.addHeader("Content-Type", format.getMimeType());
resp.getOutputStream().print(oai);
resp.setHeader("Content-Type", format.getMimeType());
resp.setCharacterEncoding("UTF-8");
resp.getWriter().print(oai);
}

void setOpenApiDocument(OpenApiDocument document) {
Expand Down

0 comments on commit 760adaf

Please sign in to comment.