Browse Source

Updated servlet-api to 3.0 and ported ServletRequestWrapper (issue 23)

tags/v0.7.0
James Moger 12 years ago
parent
commit
bd9800b7d5

+ 1
- 1
.classpath View File

@@ -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>

+ 1
- 0
docs/00_index.mkd View File

@@ -30,6 +30,7 @@ Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit
- improved: updated ui with Twitter's Bootstrap CSS toolkit
<br/>**New:** *web.loginMessage = gitblit*
- 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

+ 1
- 0
docs/04_releases.mkd View File

@@ -5,6 +5,7 @@
- improved: updated ui with Twitter's Bootstrap CSS toolkit
<br/>**New:** *web.loginMessage = gitblit*
- 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

+ 73
- 0
src/com/gitblit/ServletRequestWrapper.java View File

@@ -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);
}
}

+ 4
- 4
src/com/gitblit/build/Build.java View File

@@ -361,10 +361,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,

Loading…
Cancel
Save