jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r794595 - /jackrabbit/branches/1.x/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java
Date Thu, 16 Jul 2009 08:41:34 GMT
Author: angela
Date: Thu Jul 16 08:41:33 2009
New Revision: 794595

URL: http://svn.apache.org/viewvc?rev=794595&view=rev
Log:
JCR-2215: SPI2DAVex: HttpClient StringPart uses charset US-ASCII by default
and 1 minor improvement

Modified:
    jackrabbit/branches/1.x/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java

Modified: jackrabbit/branches/1.x/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.x/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java?rev=794595&r1=794594&r2=794595&view=diff
==============================================================================
--- jackrabbit/branches/1.x/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java
(original)
+++ jackrabbit/branches/1.x/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java
Thu Jul 16 08:41:33 2009
@@ -43,6 +43,7 @@
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 import org.apache.jackrabbit.spi.commons.name.PathBuilder;
 import org.apache.jackrabbit.spi.commons.name.PathFactoryImpl;
+import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi2dav.ExceptionConverter;
 import org.apache.jackrabbit.util.Text;
 import org.apache.jackrabbit.webdav.DavException;
@@ -85,6 +86,8 @@
     private static final String ORDER_POSITION_LAST = "#last";
     private static final String ORDER_POSITION_BEFORE = "#before";
 
+    private static final String DEFAULT_CHARSET = "UTF-8";
+
     /**
      * base uri to the extended jcr-server that can handle the GET and POST
      * (or PATCH) requests sent by this service implementation.
@@ -587,7 +590,7 @@
             for (int i = 0; i < mixinNodeTypeNames.length; i++) {
                 vs[i] = getQValueFactory(sessionInfo).create(mixinNodeTypeNames[i]);
             }
-            addProperty(nodeId, resolver.getQName(JcrConstants.JCR_MIXINTYPES), vs);
+            addProperty(nodeId, NameConstants.JCR_MIXINTYPES, vs);
         }
 
         /**
@@ -677,7 +680,7 @@
          * @param value
          */
         private void addPart(String paramName, String value) {
-            parts.add(new StringPart(paramName, value));
+            parts.add(new StringPart(paramName, value, DEFAULT_CHARSET));
         }
 
         /**
@@ -694,13 +697,13 @@
                     part = new FilePart(paramName, new BinaryPartSource(value));
                     break;
                 case PropertyType.NAME:
-                    part = new StringPart(paramName, resolver.getJCRName(value.getName()));
+                    part = new StringPart(paramName, resolver.getJCRName(value.getName()),
DEFAULT_CHARSET);
                     break;
                 case PropertyType.PATH:
-                    part = new StringPart(paramName, resolver.getJCRPath(value.getPath()));
+                    part = new StringPart(paramName, resolver.getJCRPath(value.getPath()),
DEFAULT_CHARSET);
                     break;
                 default:
-                    part = new StringPart(paramName, value.getString());
+                    part = new StringPart(paramName, value.getString(), DEFAULT_CHARSET);
             }
             String ctype = JcrValueType.contentTypeFromType(value.getType());
             ((PartBase) part).setContentType(ctype);



Mime
View raw message