jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1071579 - in /jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav: WebdavResponseImpl.java client/methods/XmlRequestEntity.java
Date Thu, 17 Feb 2011 11:18:55 GMT
Author: angela
Date: Thu Feb 17 11:18:55 2011
New Revision: 1071579

URL: http://svn.apache.org/viewvc?rev=1071579&view=rev
Log:
JCR-2897 : Remove jcr-commons dependency from jackrabbit-webdav [work in progress]

Modified:
    jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java
    jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/XmlRequestEntity.java

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java?rev=1071579&r1=1071578&r2=1071579&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java
Thu Feb 17 11:18:55 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.webdav;
 
-import org.apache.jackrabbit.commons.xml.SerializingContentHandler;
 import org.apache.jackrabbit.webdav.header.CodedUrlHeader;
 import org.apache.jackrabbit.webdav.header.Header;
 import org.apache.jackrabbit.webdav.lock.ActiveLock;
@@ -142,13 +141,12 @@ public class WebdavResponseImpl implemen
                 // JCR-2636: Need to use an explicit OutputStreamWriter
                 // instead of relying on the built-in UTF-8 serialization
                 // to avoid problems with surrogate pairs on Sun JRE 1.5.
-                Writer writer = new OutputStreamWriter(out, SerializingContentHandler.ENCODING);
+                Writer writer = new OutputStreamWriter(out, "UTF-8");
                 DomUtil.transformDocument(doc, writer);
                 writer.flush();
 
                 // TODO: Should this be application/xml? See JCR-1621
-                httpResponse.setContentType(
-                        "text/xml; charset=" + SerializingContentHandler.ENCODING);
+                httpResponse.setContentType("text/xml; charset=UTF-8");
                 httpResponse.setContentLength(out.size());
                 out.writeTo(httpResponse.getOutputStream());
             } catch (ParserConfigurationException e) {

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/XmlRequestEntity.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/XmlRequestEntity.java?rev=1071579&r1=1071578&r2=1071579&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/XmlRequestEntity.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/XmlRequestEntity.java
Thu Feb 17 11:18:55 2011
@@ -23,7 +23,6 @@ import java.io.OutputStream;
 import javax.xml.transform.TransformerException;
 
 import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.jackrabbit.commons.xml.SerializingContentHandler;
 import org.apache.jackrabbit.webdav.xml.DomUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -57,7 +56,7 @@ public class XmlRequestEntity implements
 
     public String getContentType() {
         // TODO: Shouldn't this be application/xml? See JCR-1621
-        return "text/xml; charset=" + SerializingContentHandler.ENCODING;
+        return "text/xml; charset=UTF-8";
     }
 
     public void writeRequest(OutputStream out) throws IOException {



Mime
View raw message