jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r448579 - /jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/
Date Thu, 21 Sep 2006 15:33:00 GMT
Author: angela
Date: Thu Sep 21 08:32:59 2006
New Revision: 448579

URL: http://svn.apache.org/viewvc?view=rev&rev=448579
Log:
update to commons-httpclient 3.0

Modified:
    jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java
    jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java
    jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java
    jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java
    jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java
    jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java
    jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java
    jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SubscribeMethod.java

Modified: jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java?view=diff&rev=448579&r1=448578&r2=448579
==============================================================================
--- jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java
(original)
+++ jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java
Thu Sep 21 08:32:59 2006
@@ -18,6 +18,7 @@
 
 import org.apache.commons.httpclient.methods.EntityEnclosingMethod;
 import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
 import org.apache.commons.httpclient.HttpState;
 import org.apache.commons.httpclient.HttpConnection;
 import org.apache.commons.httpclient.HttpMethodBase;
@@ -183,7 +184,7 @@
         XMLSerializer serializer = new XMLSerializer(out, format);
         serializer.setNamespaces(true);
         serializer.asDOMSerializer().serialize(requestBody);
-        setRequestBody(out.toString());
+        setRequestEntity(new StringRequestEntity(out.toString(), "text/xml", "UTF-8"));
     }
 
     /**

Modified: jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java?view=diff&rev=448579&r1=448578&r2=448579
==============================================================================
--- jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java
(original)
+++ jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java
Thu Sep 21 08:32:59 2006
@@ -77,7 +77,6 @@
             setRequestHeader(th);
             DepthHeader dh = new DepthHeader(lockInfo.isDeep());
             setRequestHeader(dh);
-            setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
             setRequestBody(lockInfo);
             isRefresh = false;
         } else {

Modified: jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java?view=diff&rev=448579&r1=448578&r2=448579
==============================================================================
--- jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java
(original)
+++ jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java
Thu Sep 21 08:32:59 2006
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.webdav.client.methods;
 
-import org.apache.jackrabbit.webdav.DavConstants;
 import org.apache.jackrabbit.webdav.DavMethods;
 import org.apache.jackrabbit.webdav.DavServletResponse;
 import org.apache.jackrabbit.webdav.version.OptionsInfo;
@@ -52,7 +51,6 @@
     public OptionsMethod(String uri, OptionsInfo optionsInfo) throws IOException {
         super(uri);
         if (optionsInfo != null) {
-            setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
             setRequestBody(optionsInfo);
         }
     }

Modified: jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java?view=diff&rev=448579&r1=448578&r2=448579
==============================================================================
--- jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java
(original)
+++ jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java
Thu Sep 21 08:32:59 2006
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.webdav.client.methods;
 
-import org.apache.jackrabbit.webdav.DavConstants;
 import org.apache.jackrabbit.webdav.DavMethods;
 import org.apache.jackrabbit.webdav.DavServletResponse;
 import org.apache.jackrabbit.webdav.ordering.OrderPatch;
@@ -43,7 +42,6 @@
      */
     public OrderPatchMethod(String uri, OrderPatch orderPatch) throws IOException {
         super(uri);
-        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
         setRequestBody(orderPatch);
     }
 
@@ -64,7 +62,6 @@
         String orderPosition = (first) ? OrderingConstants.XML_FIRST : OrderingConstants.XML_LAST;
         Position p = new Position(orderPosition);
         OrderPatch op = new OrderPatch(orderingType, new OrderPatch.Member(memberSegment,
p));
-        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
         setRequestBody(op);
     }
 
@@ -86,7 +83,6 @@
         String orderPosition = (before) ? OrderingConstants.XML_BEFORE : OrderingConstants.XML_AFTER;
         Position p = new Position(orderPosition, targetMemberSegmet);
         OrderPatch op = new OrderPatch(orderingType, new OrderPatch.Member(memberSegment,
p));
-        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
         setRequestBody(op);
     }
 

Modified: jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java?view=diff&rev=448579&r1=448578&r2=448579
==============================================================================
--- jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java
(original)
+++ jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java
Thu Sep 21 08:32:59 2006
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.webdav.client.methods;
 
-import org.apache.jackrabbit.webdav.DavConstants;
 import org.apache.jackrabbit.webdav.DavMethods;
 import org.apache.jackrabbit.webdav.DavServletResponse;
 import org.apache.jackrabbit.webdav.header.DepthHeader;
@@ -58,8 +57,6 @@
         DepthHeader dh = new DepthHeader(depth);
         setRequestHeader(dh.getHeaderName(), dh.getHeaderValue());
 
-        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
-        
         // build the request body
         try {
             // create the document and attach the root element

Modified: jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java?view=diff&rev=448579&r1=448578&r2=448579
==============================================================================
--- jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java
(original)
+++ jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java
Thu Sep 21 08:32:59 2006
@@ -41,9 +41,7 @@
         isDeep = reportInfo.getDepth() > DavConstants.DEPTH_0;
 
 	setRequestHeader(dh);
-
-        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
-       	setRequestBody(reportInfo);
+        setRequestBody(reportInfo);
     }
 
     //---------------------------------------------------------< HttpMethod >---

Modified: jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java?view=diff&rev=448579&r1=448578&r2=448579
==============================================================================
--- jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java
(original)
+++ jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java
Thu Sep 21 08:32:59 2006
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.webdav.client.methods;
 
-import org.apache.jackrabbit.webdav.DavConstants;
 import org.apache.jackrabbit.webdav.DavMethods;
 import org.apache.jackrabbit.webdav.search.SearchInfo;
 import org.apache.jackrabbit.webdav.DavServletResponse;
@@ -40,7 +39,6 @@
     public SearchMethod(String uri, String statement, String language, Namespace languageNamespace)
throws IOException {
         super(uri);
         if (language != null && statement != null) {
-            setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
           
             // build the request body
             SearchInfo searchInfo = new SearchInfo(language, languageNamespace, statement);
             setRequestBody(searchInfo);
@@ -49,7 +47,6 @@
 
     public SearchMethod(String uri, SearchInfo searchInfo) throws IOException {
         super(uri);
-        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
         setRequestBody(searchInfo);
     }
 

Modified: jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SubscribeMethod.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SubscribeMethod.java?view=diff&rev=448579&r1=448578&r2=448579
==============================================================================
--- jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SubscribeMethod.java
(original)
+++ jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SubscribeMethod.java
Thu Sep 21 08:32:59 2006
@@ -90,9 +90,7 @@
         }
         // always set depth header since value is boolean flag
         setRequestHeader(new DepthHeader(subscriptionInfo.isDeep()));
-
-        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
-       	setRequestBody(subscriptionInfo);
+        setRequestBody(subscriptionInfo);
     }
 
     public SubscriptionDiscovery getResponseAsSubscriptionDiscovery() throws IOException,
DavException {



Mime
View raw message