From 4bcaea2e40ab1ee192888f7d29c334a2a3cd3699 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 17 Aug 2012 15:49:44 -0400
Subject: [PATCH] Fix performance logging null pointer on anonymous repository browsing
---
src/com/gitblit/RpcServlet.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/com/gitblit/RpcServlet.java b/src/com/gitblit/RpcServlet.java
index 115d553..929e9cc 100644
--- a/src/com/gitblit/RpcServlet.java
+++ b/src/com/gitblit/RpcServlet.java
@@ -49,7 +49,7 @@
private static final long serialVersionUID = 1L;
- public static final int PROTOCOL_VERSION = 2;
+ public static final int PROTOCOL_VERSION = 4;
public RpcServlet() {
super();
@@ -298,6 +298,9 @@
for (String key : keys) {
managementSettings.add(settings.get(key));
}
+ if (allowManagement) {
+ managementSettings.pushScripts = settings.pushScripts;
+ }
result = managementSettings;
}
} else if (RpcRequest.EDIT_SETTINGS.equals(reqType)) {
@@ -316,6 +319,13 @@
} else {
response.sendError(notAllowedCode);
}
+ } else if (RpcRequest.CLEAR_REPOSITORY_CACHE.equals(reqType)) {
+ // clear the repository list cache
+ if (allowAdmin) {
+ GitBlit.self().resetRepositoryListCache();
+ } else {
+ response.sendError(notAllowedCode);
+ }
}
// send the result of the request
--
Gitblit v1.9.1