jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1777408 - in /jackrabbit/commons/filevault/trunk: parent/pom.xml vault-davex/pom.xml vault-davex/src/main/java/org/apache/jackrabbit/vault/davex/DAVExRepositoryFactory.java
Date Thu, 05 Jan 2017 04:09:35 GMT
Author: tripod
Date: Thu Jan  5 04:09:35 2017
New Revision: 1777408

URL: http://svn.apache.org/viewvc?rev=1777408&view=rev
Log:
JCRVLT-148 Migrate org.apache.jackrabbit.vault.vault-davex to httpclient 4.x

Modified:
    jackrabbit/commons/filevault/trunk/parent/pom.xml
    jackrabbit/commons/filevault/trunk/vault-davex/pom.xml
    jackrabbit/commons/filevault/trunk/vault-davex/src/main/java/org/apache/jackrabbit/vault/davex/DAVExRepositoryFactory.java

Modified: jackrabbit/commons/filevault/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/parent/pom.xml?rev=1777408&r1=1777407&r2=1777408&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/parent/pom.xml (original)
+++ jackrabbit/commons/filevault/trunk/parent/pom.xml Thu Jan  5 04:09:35 2017
@@ -40,7 +40,7 @@
     </description>
 
     <properties>
-        <jackrabbit.version>2.11.3</jackrabbit.version>
+        <jackrabbit.version>2.13.7</jackrabbit.version>
         <oak.version>1.5.9</oak.version>
     </properties>
 
@@ -338,12 +338,12 @@
             <dependency>
                 <groupId>commons-codec</groupId>
                 <artifactId>commons-codec</artifactId>
-                <version>1.2</version>
+                <version>1.10</version>
             </dependency>
             <dependency>
-                <groupId>commons-httpclient</groupId>
-                <artifactId>commons-httpclient</artifactId>
-                <version>3.1</version>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpmime</artifactId>
+                <version>4.5.2</version>
             </dependency>
             <dependency>
                 <groupId>commons-logging</groupId>

Modified: jackrabbit/commons/filevault/trunk/vault-davex/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-davex/pom.xml?rev=1777408&r1=1777407&r2=1777408&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-davex/pom.xml (original)
+++ jackrabbit/commons/filevault/trunk/vault-davex/pom.xml Thu Jan  5 04:09:35 2017
@@ -84,6 +84,11 @@
                     <groupId>org.slf4j</groupId>
                     <artifactId>jcl-over-slf4j</artifactId>
                 </exclusion>
+                <exclusion>
+                    <!-- exclude legacy http client to be included (see JCRVLT-148) -->
+                    <groupId>commons-httpclient</groupId>
+                    <artifactId>commons-httpclient</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>

Modified: jackrabbit/commons/filevault/trunk/vault-davex/src/main/java/org/apache/jackrabbit/vault/davex/DAVExRepositoryFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-davex/src/main/java/org/apache/jackrabbit/vault/davex/DAVExRepositoryFactory.java?rev=1777408&r1=1777407&r2=1777408&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-davex/src/main/java/org/apache/jackrabbit/vault/davex/DAVExRepositoryFactory.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-davex/src/main/java/org/apache/jackrabbit/vault/davex/DAVExRepositoryFactory.java
Thu Jan  5 04:09:35 2017
@@ -21,10 +21,8 @@ import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -32,12 +30,6 @@ import javax.jcr.NamespaceException;
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.params.DefaultHttpParams;
-import org.apache.commons.httpclient.params.DefaultHttpParamsFactory;
-import org.apache.commons.httpclient.params.HostParams;
-import org.apache.commons.httpclient.params.HttpParams;
-import org.apache.commons.httpclient.params.HttpParamsFactory;
 import org.apache.commons.io.FileUtils;
 import org.apache.jackrabbit.client.RepositoryFactoryImpl;
 import org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory;
@@ -65,11 +57,6 @@ public class DAVExRepositoryFactory impl
      */
     public static final String PARAM_JCR_REMOTING_SPILOG = "jcr.remoting.spilog";
 
-    /**
-     * Name of the system property that controls the referer header.
-     */
-    public static final String PARAM_JCR_REMOTING_REFERER = "jcr.remoting.referer";
-
     private static final Set<String> SCHEMES = new HashSet<String>();
     static {
         SCHEMES.add("http");
@@ -115,12 +102,6 @@ public class DAVExRepositoryFactory impl
                 );
             }
 
-            // set default params for httpclient that will be used in jackrabbit's webdav
client
-            // this is to provide a referer header for all POST and PUT requests.
-            DefaultHttpParams.setHttpParamsFactory(new MyHttpParamsFactory(
-                    System.getProperty(PARAM_JCR_REMOTING_REFERER, "http://localhost/")
-            ));
-
             // explicit set workspace (JCRVLT-144)
             String workspace = address.getWorkspace();
             parameters.put(Spi2davexRepositoryServiceFactory.PARAM_WORKSPACE_NAME_DEFAULT,
workspace == null ? "" : workspace);
@@ -155,21 +136,3 @@ class DefaultBatchReadConfig implements
         this.defaultDepth = defaultDepth;
     }
 }
-
-class MyHttpParamsFactory implements HttpParamsFactory {
-
-    private final HttpParams params;
-
-    MyHttpParamsFactory(String referer) {
-        params = new DefaultHttpParamsFactory().getDefaultParams();
-        List<Header> headers = new ArrayList<Header>();
-        if (referer != null && referer.length() > 0) {
-            headers.add(new Header("Referer", referer));
-        }
-        params.setParameter(HostParams.DEFAULT_HEADERS, headers);
-    }
-
-    public HttpParams getDefaultParams() {
-        return params;
-    }
-}
\ No newline at end of file



Mime
View raw message