From 2ec0d7fcf3017c3b8f825bd6d1e82da0966b24ca Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Tue, 10 Jul 2012 23:18:11 -0400 Subject: [PATCH] Final CSS/layout tweaks for responsive UI (issue 101) --- src/com/gitblit/PagesServlet.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/gitblit/PagesServlet.java b/src/com/gitblit/PagesServlet.java index d6304f7..ad9276b 100644 --- a/src/com/gitblit/PagesServlet.java +++ b/src/com/gitblit/PagesServlet.java @@ -141,13 +141,15 @@ } response.setDateHeader("Last-Modified", JGitUtils.getCommitDate(commit).getTime()); + String [] encodings = GitBlit.getEncodings(); + RevTree tree = commit.getTree(); byte[] content = null; if (StringUtils.isEmpty(resource)) { // find resource String[] files = { "index.html", "index.htm", "index.mkd" }; for (String file : files) { - content = JGitUtils.getStringContent(r, tree, file) + content = JGitUtils.getStringContent(r, tree, file, encodings) .getBytes(Constants.ENCODING); if (content != null) { resource = file; @@ -165,7 +167,7 @@ contentType = "text/plain"; } if (contentType.startsWith("text")) { - content = JGitUtils.getStringContent(r, tree, resource).getBytes( + content = JGitUtils.getStringContent(r, tree, resource, encodings).getBytes( Constants.ENCODING); } else { content = JGitUtils.getByteContent(r, tree, resource); @@ -177,7 +179,7 @@ // no content, try custom 404 page if (ArrayUtils.isEmpty(content)) { - String custom404 = JGitUtils.getStringContent(r, tree, "404.html"); + String custom404 = JGitUtils.getStringContent(r, tree, "404.html", encodings); if (!StringUtils.isEmpty(custom404)) { content = custom404.getBytes(Constants.ENCODING); } -- Gitblit v1.9.1