jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1469975 - in /jackrabbit/branches/2.4: ./ jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
Date Fri, 19 Apr 2013 18:06:25 GMT
Author: reschke
Date: Fri Apr 19 18:06:25 2013
New Revision: 1469975

URL: http://svn.apache.org/r1469975
Log:
JCR-3565: undo incorrect changes (ported to 2.4)

Modified:
    jackrabbit/branches/2.4/   (props changed)
    jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
    jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java

Propchange: jackrabbit/branches/2.4/
------------------------------------------------------------------------------
  Merged /jackrabbit/trunk:r1469940

Modified: jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java?rev=1469975&r1=1469974&r2=1469975&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
Fri Apr 19 18:06:25 2013
@@ -88,10 +88,6 @@ public abstract class AbstractLocatorFac
             throw new IllegalArgumentException("Request handle must not be null.");
         }
 
-        if (prefix == null || prefix.length() == 0) {
-            throw new IllegalArgumentException("Prefix must be an absolute URI.");
-        }
-
         // build prefix string and remove all prefixes from the given href.
         StringBuffer b = new StringBuffer("");
         if (prefix != null && prefix.length() > 0) {

Modified: jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java?rev=1469975&r1=1469974&r2=1469975&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
Fri Apr 19 18:06:25 2013
@@ -88,7 +88,6 @@ public class WebdavRequestImpl implement
     private final DavLocatorFactory factory;
     private final IfHeader ifHeader;
     private final String hrefPrefix;
-    private final String uriPrefix;
 
     private DavSession session;
 
@@ -118,8 +117,8 @@ public class WebdavRequestImpl implement
 
         String host = getHeader("Host");
         String scheme = getScheme();
-        this.uriPrefix = scheme + "://" + host + getContextPath();
-        this.hrefPrefix = createAbsoluteURI ? this.uriPrefix : getContextPath();
+        String uriPrefix = scheme + "://" + host + getContextPath();
+        this.hrefPrefix = createAbsoluteURI ? uriPrefix : getContextPath();
     }
 
     /**
@@ -165,7 +164,7 @@ public class WebdavRequestImpl implement
         if (path.startsWith(ctx)) {
             path = path.substring(ctx.length());
         }
-        return factory.createResourceLocator(uriPrefix, path);
+        return factory.createResourceLocator(hrefPrefix, path);
     }
 
     /**
@@ -221,7 +220,7 @@ public class WebdavRequestImpl implement
                 throw new DavException(DavServletResponse.SC_FORBIDDEN);
             }
         }
-        return factory.createResourceLocator(uriPrefix, ref);
+        return factory.createResourceLocator(hrefPrefix, ref);
     }
 
     /**
@@ -231,7 +230,7 @@ public class WebdavRequestImpl implement
      */
     public DavResourceLocator getMemberLocator(String segment) {
         String path = (this.getRequestLocator().getHref(true) + segment).substring(hrefPrefix.length());
-        return factory.createResourceLocator(uriPrefix, path);
+        return factory.createResourceLocator(hrefPrefix, path);
     }
 
     /**



Mime
View raw message