diff options
author | Yuhi Ishikura <yuhi.ishikura@gmail.com> | 2013-06-02 23:44:00 +0900 |
---|---|---|
committer | Yuhi Ishikura <yuhi.ishikura@gmail.com> | 2013-06-02 23:44:03 +0900 |
commit | 1dcfd2e983489e3f6c318e1d30ae59c925349fbc (patch) | |
tree | a71ddca8c69a0f318a1f5ad6d93a05ded23fdd82 /src/main/java/com/gitblit/PagesServlet.java | |
parent | 889d4875e846ac326fead6c6da4ccfc1ab9c25b8 (diff) | |
download | gitblit-1dcfd2e983489e3f6c318e1d30ae59c925349fbc.tar.gz gitblit-1dcfd2e983489e3f6c318e1d30ae59c925349fbc.zip |
Fixed problem that PagesServlet couldn't provide index.htm and index.mkd.
Diffstat (limited to 'src/main/java/com/gitblit/PagesServlet.java')
-rw-r--r-- | src/main/java/com/gitblit/PagesServlet.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/PagesServlet.java b/src/main/java/com/gitblit/PagesServlet.java index 91f25b70..34fe10d3 100644 --- a/src/main/java/com/gitblit/PagesServlet.java +++ b/src/main/java/com/gitblit/PagesServlet.java @@ -149,8 +149,11 @@ public class PagesServlet extends HttpServlet { // find resource
String[] files = { "index.html", "index.htm", "index.mkd" };
for (String file : files) {
- content = JGitUtils.getStringContent(r, tree, file, encodings)
- .getBytes(Constants.ENCODING);
+ String stringContent = JGitUtils.getStringContent(r, tree, file, encodings);
+ if(stringContent == null){
+ continue;
+ }
+ content = stringContent.getBytes(Constants.ENCODING);
if (content != null) {
resource = file;
// assume text/html unless the servlet container
|