manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1798553 - in /manifoldcf/trunk: CHANGES.txt connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java
Date Mon, 12 Jun 2017 23:33:23 GMT
Author: kwright
Date: Mon Jun 12 23:33:23 2017
New Revision: 1798553

URL: http://svn.apache.org/viewvc?rev=1798553&view=rev
Log:
Fix for CONNECTORS-1251.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1798553&r1=1798552&r2=1798553&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Mon Jun 12 23:33:23 2017
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 2.8-dev =====================
 
+CONNECTORS-1251: Fix encoding issues with confluence connector.
+(Marisol Redondo, Karl Wright)
+
 CONNECTORS-1431: Support different versions of ES (including 5.x and
 up).
 (Karl Wright, Hans Van Goethem)

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java?rev=1798553&r1=1798552&r2=1798553&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java
(original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java
Mon Jun 12 23:33:23 2017
@@ -337,7 +337,7 @@ public class ConfluenceClient {
    */
   private <T extends ConfluenceResource> ConfluenceResponse<T> responseFromHttpEntity(HttpEntity
entity, ConfluenceResourceBuilder<T> builder)
       throws Exception {
-    String stringEntity = EntityUtils.toString(entity);
+    String stringEntity = EntityUtils.toString(entity, "UTF-8");
 
     final JSONParser parser = new JSONParser();
     final JSONObject responseObject = (JSONObject)parser.parse(new StringReader(stringEntity));
@@ -584,7 +584,7 @@ public class ConfluenceClient {
    * @throws Exception
    */
   private MutablePage pageFromHttpEntity(HttpEntity entity) throws Exception {
-    String stringEntity = EntityUtils.toString(entity);
+    String stringEntity = EntityUtils.toString(entity, "UTF-8");
 
     final JSONParser parser = new JSONParser();
     final JSONObject responseObject = (JSONObject)parser.parse(new StringReader(stringEntity));
@@ -601,7 +601,7 @@ public class ConfluenceClient {
    */
   private MutableAttachment attachmentFromHttpEntity(HttpEntity entity)
       throws Exception {
-    String stringEntity = EntityUtils.toString(entity);
+    String stringEntity = EntityUtils.toString(entity, "UTF-8");
     final JSONParser parser = new JSONParser();
     final JSONObject responseObject = (JSONObject)parser.parse(new StringReader(stringEntity));;
     MutableAttachment response = (MutableAttachment) Attachment
@@ -685,7 +685,7 @@ public class ConfluenceClient {
   }
 
   private Spaces spacesFromHttpEntity(HttpEntity entity) throws Exception {
-    String stringEntity = EntityUtils.toString(entity);
+    String stringEntity = EntityUtils.toString(entity, "UTF-8");
     final JSONParser parser = new JSONParser();
     final JSONArray responseObject = (JSONArray)parser.parse(new StringReader(stringEntity));
     Spaces response = Spaces.fromJson(responseObject);
@@ -694,7 +694,7 @@ public class ConfluenceClient {
   }
   
   private List<String> permissionsFromHttpEntity(HttpEntity entity) throws Exception
{
-    String stringEntity = EntityUtils.toString(entity);
+    String stringEntity = EntityUtils.toString(entity, "UTF-8");
     final JSONParser parser = new JSONParser();
     final JSONArray responseObject = (JSONArray)parser.parse(new StringReader(stringEntity));
     final List<String> permissions = Lists.newArrayList();



Mime
View raw message