diff options
author | James Moger <james.moger@gitblit.com> | 2014-06-30 21:29:01 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-07-03 16:59:08 -0400 |
commit | 94146dd495aad8157c423bfd9a1ae47c8e26b32c (patch) | |
tree | 40ff861a1ec47e4fb544a433bea5fb627ad7e9b3 | |
parent | 575d4f690b8eaedfdd3981fe7c00ecc41d358e73 (diff) | |
download | gitblit-94146dd495aad8157c423bfd9a1ae47c8e26b32c.tar.gz gitblit-94146dd495aad8157c423bfd9a1ae47c8e26b32c.zip |
Use forked guice-servlet jar rather than stock jar from Google
-rw-r--r-- | .classpath | 2 | ||||
-rw-r--r-- | build.moxie | 6 | ||||
-rw-r--r-- | gitblit.iml | 6 | ||||
-rw-r--r-- | src/main/java/com/gitblit/servlet/AuthenticationFilter.java | 8 |
4 files changed, 10 insertions, 12 deletions
@@ -9,7 +9,7 @@ <classpathentry kind="lib" path="ext/javax.inject-1.jar" sourcepath="ext/src/javax.inject-1.jar" /> <classpathentry kind="lib" path="ext/aopalliance-1.0.jar" sourcepath="ext/src/aopalliance-1.0.jar" /> <classpathentry kind="lib" path="ext/guava-16.0.1.jar" sourcepath="ext/src/guava-16.0.1.jar" /> - <classpathentry kind="lib" path="ext/guice-servlet-4.0-SNAPSHOT.jar" sourcepath="ext/src/guice-servlet-4.0-SNAPSHOT.jar" /> + <classpathentry kind="lib" path="ext/guice-servlet-4.0-gb1.jar" sourcepath="ext/src/guice-servlet-4.0-gb1.jar" /> <classpathentry kind="lib" path="ext/annotations-12.0.jar" sourcepath="ext/src/annotations-12.0.jar" /> <classpathentry kind="lib" path="ext/log4j-1.2.17.jar" sourcepath="ext/src/log4j-1.2.17.jar" /> <classpathentry kind="lib" path="ext/slf4j-api-1.7.7.jar" sourcepath="ext/src/slf4j-api-1.7.7.jar" /> diff --git a/build.moxie b/build.moxie index 3514577e..8ca52755 100644 --- a/build.moxie +++ b/build.moxie @@ -96,9 +96,10 @@ registeredRepositories: - { id: eclipse, url: 'http://repo.eclipse.org/content/groups/releases' } - { id: eclipse-snapshots, url: 'http://repo.eclipse.org/content/groups/snapshots' } - { id: atlassian-contrib, url: 'https://maven.atlassian.com/content/repositories/atlassian-3rdparty' } +- { id: gitblit, url: 'http://gitblit.github.io/gitblit-maven' } # Source all dependencies from the following repositories in the specified order -repositories: central, eclipse-snapshots, eclipse, atlassian-contrib +repositories: central, eclipse-snapshots, eclipse, atlassian-contrib, gitblit # Convenience properties for dependencies properties: { @@ -113,7 +114,8 @@ properties: { sshd.version: 0.11.1-atlassian-1 mina.version: 2.0.7 guice.version : 4.0-beta4 - guice-servlet.version : 4.0-SNAPSHOT + # Gitblit maintains a fork of guice-servlet + guice-servlet.version : 4.0-gb1 } # Dependencies diff --git a/gitblit.iml b/gitblit.iml index 8912282a..cc9324f5 100644 --- a/gitblit.iml +++ b/gitblit.iml @@ -58,13 +58,13 @@ </library> </orderEntry> <orderEntry type="module-library"> - <library name="guice-servlet-4.0-SNAPSHOT.jar"> + <library name="guice-servlet-4.0-gb1.jar"> <CLASSES> - <root url="jar://$MODULE_DIR$/ext/guice-servlet-4.0-SNAPSHOT.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/guice-servlet-4.0-gb1.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$MODULE_DIR$/ext/src/guice-servlet-4.0-SNAPSHOT.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/src/guice-servlet-4.0-gb1.jar!/" /> </SOURCES> </library> </orderEntry> diff --git a/src/main/java/com/gitblit/servlet/AuthenticationFilter.java b/src/main/java/com/gitblit/servlet/AuthenticationFilter.java index 35a62365..6f13252a 100644 --- a/src/main/java/com/gitblit/servlet/AuthenticationFilter.java +++ b/src/main/java/com/gitblit/servlet/AuthenticationFilter.java @@ -99,12 +99,8 @@ public abstract class AuthenticationFilter implements Filter { * @return url
*/
protected String getFullUrl(HttpServletRequest httpRequest) {
- String contextPath = httpRequest.getContextPath();
- String servletPath = httpRequest.getServletPath();
- String pathInfo = httpRequest.getPathInfo();
- String servletUrl = contextPath + servletPath;
- String requestURI = httpRequest.getRequestURI();
- String url = requestURI.substring(servletUrl.length());
+ String servletUrl = httpRequest.getContextPath() + httpRequest.getServletPath();
+ String url = httpRequest.getRequestURI().substring(servletUrl.length());
String params = httpRequest.getQueryString();
if (url.length() > 0 && url.charAt(0) == '/') {
url = url.substring(1);
|