jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r794329 - /jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java
Date Wed, 15 Jul 2009 17:31:10 GMT
Author: angela
Date: Wed Jul 15 17:31:10 2009
New Revision: 794329

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

Modified:
    jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java?rev=794329&r1=794328&r2=794329&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/RepositoryServiceImpl.java
Wed Jul 15 17:31:10 2009
@@ -86,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.
@@ -694,7 +696,7 @@
          * @param value
          */
         private void addPart(String paramName, String value) {
-            parts.add(new StringPart(paramName, value));
+            parts.add(new StringPart(paramName, value, DEFAULT_CHARSET));
         }
 
         /**
@@ -711,13 +713,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