diff options
author | James Moger <james.moger@gitblit.com> | 2011-10-07 21:11:55 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-10-07 21:11:55 -0400 |
commit | 55cecdbb6c961441330c928f9ed587582f317f4b (patch) | |
tree | c652544d733d66b21d261c22429123a2a0168e1e | |
parent | cc5ad8d53bcf953eb60e11dcf72aa9f69ec043f3 (diff) | |
parent | bd9800b7d52c13a46e4fbc5c6e9ff0d583f5f2fd (diff) | |
download | gitblit-55cecdbb6c961441330c928f9ed587582f317f4b.tar.gz gitblit-55cecdbb6c961441330c928f9ed587582f317f4b.zip |
Merge branch 'master' into rpc
-rw-r--r-- | .classpath | 2 | ||||
-rw-r--r-- | docs/00_index.mkd | 1 | ||||
-rw-r--r-- | docs/04_releases.mkd | 1 | ||||
-rw-r--r-- | src/com/gitblit/GitBlitServer.java | 8 | ||||
-rw-r--r-- | src/com/gitblit/ServletRequestWrapper.java | 73 | ||||
-rw-r--r-- | src/com/gitblit/build/Build.java | 8 |
6 files changed, 84 insertions, 9 deletions
@@ -9,7 +9,6 @@ <attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/log4j-1.2.16-javadoc.jar!/"/>
</attributes>
</classpathentry>
- <classpathentry kind="lib" path="ext/servlet-api-2.5.jar" sourcepath="ext/servlet-api-2.5-sources.jar"/>
<classpathentry kind="lib" path="ext/slf4j-api-1.6.1.jar" sourcepath="ext/slf4j-api-1.6.1-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/slf4j-api-1.6.1-javadoc.jar!/"/>
@@ -97,5 +96,6 @@ <attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/org.eclipse.jgit-1.1.0.201109151100-r-javadoc.jar!/"/>
</attributes>
</classpathentry>
+ <classpathentry kind="lib" path="ext/javax.servlet-3.0.1.jar" sourcepath="ext/javax.servlet-3.0.1-sources.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/docs/00_index.mkd b/docs/00_index.mkd index 079bc3d3..f5820cb6 100644 --- a/docs/00_index.mkd +++ b/docs/00_index.mkd @@ -37,6 +37,7 @@ Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit - added: reusable JSON RPC client class
- added: Swing RPC Client application for cloning and administration of repositories, users, and federation proposals.
- fixed/broke: federation protocol. dates are now serialized to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard. This breaks 0.6.0 federation clients/servers.
+- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8)
- fixed: Set the RSS content type for Firefox 4 (issue 22)
- fixed: Null pointer exception if did not set federation strategy (issue 20)
- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd index 10ef2bb9..3eaba405 100644 --- a/docs/04_releases.mkd +++ b/docs/04_releases.mkd @@ -11,6 +11,7 @@ - added: reusable JSON RPC client class
- added: Swing RPC Client application for cloning and administration of repositories, users, and federation proposals.
- fixed/broke: federation protocol. dates are now serialized to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard. This breaks 0.6.0 federation clients/servers.
+- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8)
- fixed: Set the RSS content type for Firefox 4 (issue 22) - fixed: Null pointer exception if did not set federation strategy (issue 20)
- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
diff --git a/src/com/gitblit/GitBlitServer.java b/src/com/gitblit/GitBlitServer.java index 204ae4d9..5c8c5fe4 100644 --- a/src/com/gitblit/GitBlitServer.java +++ b/src/com/gitblit/GitBlitServer.java @@ -147,7 +147,7 @@ public class GitBlitServer { Connector httpConnector = createConnector(params.useNIO, params.port);
String bindInterface = settings.getString(Keys.server.httpBindInterface, null);
if (!StringUtils.isEmpty(bindInterface)) {
- logger.warn(MessageFormat.format("Binding connector on port {0} to {1}",
+ logger.warn(MessageFormat.format("Binding connector on port {0,number,0} to {1}",
params.port, bindInterface));
httpConnector.setHost(bindInterface);
}
@@ -170,7 +170,7 @@ public class GitBlitServer { params.useNIO, params.securePort);
String bindInterface = settings.getString(Keys.server.httpsBindInterface, null);
if (!StringUtils.isEmpty(bindInterface)) {
- logger.warn(MessageFormat.format("Binding ssl connector on port {0} to {1}",
+ logger.warn(MessageFormat.format("Binding ssl connector on port {0,number,0} to {1}",
params.securePort, bindInterface));
secureConnector.setHost(bindInterface);
}
@@ -327,8 +327,8 @@ public class GitBlitServer { }
if (allowRenegotiation) {
logger.info(" allowing SSL renegotiation on Java " + v);
- }
- connector.setAllowRenegotiate(true);
+ connector.setAllowRenegotiate(allowRenegotiation);
+ }
connector.setKeystore(keystore.getAbsolutePath());
connector.setPassword(password);
connector.setPort(port);
diff --git a/src/com/gitblit/ServletRequestWrapper.java b/src/com/gitblit/ServletRequestWrapper.java index 9110ebf7..d74a9ecb 100644 --- a/src/com/gitblit/ServletRequestWrapper.java +++ b/src/com/gitblit/ServletRequestWrapper.java @@ -19,15 +19,24 @@ import java.io.BufferedReader; import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.Principal;
+import java.util.Collection;
import java.util.Enumeration;
import java.util.Locale;
import java.util.Map;
+import javax.servlet.AsyncContext;
+import javax.servlet.DispatcherType;
import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import javax.servlet.http.Part;
/**
* ServletRequestWrapper is a pass-through/delegate wrapper class for a servlet
@@ -324,4 +333,68 @@ public abstract class ServletRequestWrapper implements HttpServletRequest { public boolean isRequestedSessionIdFromUrl() {
return req.isRequestedSessionIdFromUrl();
}
+
+ /*
+ * Servlet 3.0 Methods
+ */
+
+ @Override
+ public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
+ return false;
+ }
+
+ @Override
+ public void login(String username, String password) throws ServletException {
+ }
+
+ @Override
+ public void logout() throws ServletException {
+ }
+
+
+ @Override
+ public Part getPart(String arg0) throws IOException, ServletException {
+ return req.getPart(arg0);
+ }
+
+ @Override
+ public Collection<Part> getParts() throws IOException, ServletException {
+ return req.getParts();
+ }
+
+ @Override
+ public AsyncContext getAsyncContext() {
+ return req.getAsyncContext();
+ }
+
+ @Override
+ public DispatcherType getDispatcherType() {
+ return req.getDispatcherType();
+ }
+
+ @Override
+ public ServletContext getServletContext() {
+ return req.getServletContext();
+ }
+
+ @Override
+ public boolean isAsyncStarted() {
+ return req.isAsyncStarted();
+ }
+
+ @Override
+ public boolean isAsyncSupported() {
+ return req.isAsyncStarted();
+ }
+
+ @Override
+ public AsyncContext startAsync() throws IllegalStateException {
+ return req.startAsync();
+ }
+
+ @Override
+ public AsyncContext startAsync(ServletRequest arg0, ServletResponse arg1)
+ throws IllegalStateException {
+ return req.startAsync(arg0, arg1);
+ }
}
\ No newline at end of file diff --git a/src/com/gitblit/build/Build.java b/src/com/gitblit/build/Build.java index 862c295d..6ca8cb6b 100644 --- a/src/com/gitblit/build/Build.java +++ b/src/com/gitblit/build/Build.java @@ -378,10 +378,10 @@ public class Build { "bc75f05dd4f7fa848720ac669b8b438ee4a6b146",
"dcd42f672e734521d1a6ccc0c2f9ecded1a1a281");
- public static final MavenObject SERVLET = new MavenObject("Servlet 2.5", "javax/servlet",
- "servlet-api", "2.5", 105000, 158000, 0,
- "5959582d97d8b61f4d154ca9e495aafd16726e34",
- "021599814ad9a605b86f3e6381571beccd861a32", null);
+ public static final MavenObject SERVLET = new MavenObject("Servlet 3.0", "org/glassfish",
+ "javax.servlet", "3.0.1", 84000, 211000, 0,
+ "58f17c941cd0607bb5edcbcafc491d02265ac9a1",
+ "63f2f8bcdd3f138020bbadd5c847e8f3847b77d2", null);
public static final MavenObject SLF4JAPI = new MavenObject("SLF4J API", "org/slf4j",
"slf4j-api", "1.6.1", 25500, 45000, 182000,
|