]> source.dussan.org Git - gitblit.git/commitdiff
Use forked guice-servlet jar rather than stock jar from Google
authorJames Moger <james.moger@gitblit.com>
Tue, 1 Jul 2014 01:29:01 +0000 (21:29 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 3 Jul 2014 20:59:08 +0000 (16:59 -0400)
.classpath
build.moxie
gitblit.iml
src/main/java/com/gitblit/servlet/AuthenticationFilter.java

index a7a8963425547c77f22e02f7c091dc19dcf0567f..274dee2b597119e61d1e7d14022d0bbf52aaeabb 100644 (file)
@@ -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" />
index 3514577e24b92d52ccab01aab2ec450df807d7cd..8ca5275563a60243b41c9f3ffd22267ed70c5b5c 100644 (file)
@@ -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
index 8912282a072963c2de91e140f6f499a9c697ed37..cc9324f5119bca6be8f72cfc88208d72300fc798 100644 (file)
       </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>
index 35a623651774a16bba18fbfd3ed65e704eec9b87..6f13252a2365e3931e7a861d3eba576f8c1bdf22 100644 (file)
@@ -99,12 +99,8 @@ public abstract class AuthenticationFilter implements Filter {
         * @return url\r
         */\r
        protected String getFullUrl(HttpServletRequest httpRequest) {\r
-               String contextPath = httpRequest.getContextPath();\r
-               String servletPath = httpRequest.getServletPath();\r
-               String pathInfo = httpRequest.getPathInfo();\r
-               String servletUrl = contextPath + servletPath;\r
-               String requestURI = httpRequest.getRequestURI();\r
-               String url = requestURI.substring(servletUrl.length());\r
+               String servletUrl = httpRequest.getContextPath() + httpRequest.getServletPath();\r
+               String url = httpRequest.getRequestURI().substring(servletUrl.length());\r
                String params = httpRequest.getQueryString();\r
                if (url.length() > 0 && url.charAt(0) == '/') {\r
                        url = url.substring(1);\r