roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r440813 - /incubator/roller/branches/roller_3.0/src/org/apache/roller/webservices/atomprotocol/AtomServlet.java
Date Wed, 06 Sep 2006 18:03:39 GMT
Author: snoopdave
Date: Wed Sep  6 11:03:38 2006
New Revision: 440813

URL: http://svn.apache.org/viewvc?view=rev&rev=440813
Log:
Set UTF-8 on APP posts and puts

Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/webservices/atomprotocol/AtomServlet.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/webservices/atomprotocol/AtomServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/webservices/atomprotocol/AtomServlet.java?view=diff&rev=440813&r1=440812&r2=440813
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/webservices/atomprotocol/AtomServlet.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/webservices/atomprotocol/AtomServlet.java
Wed Sep  6 11:03:38 2006
@@ -46,6 +46,7 @@
 import com.sun.syndication.io.FeedException;
 import com.sun.syndication.io.WireFeedInput;
 import com.sun.syndication.io.WireFeedOutput;
+import java.io.BufferedReader;
 import java.io.StringWriter;
 import org.jdom.Namespace;
 import org.apache.roller.config.RollerConfig;
@@ -158,8 +159,9 @@
                     if (req.getContentType().startsWith("application/atom+xml")) {
 
                         // parse incoming entry
-                        Entry unsavedEntry = parseEntry(
-                            new InputStreamReader(req.getInputStream()));
+                        Entry unsavedEntry = parseEntry(new BufferedReader(
+                            new InputStreamReader(
+                                req.getInputStream(), "UTF-8")));
 
                         // call handler to post it
                         Entry savedEntry = handler.postEntry(pathInfo, unsavedEntry);
@@ -239,8 +241,9 @@
                 if (handler.isEntryURI(pathInfo)) {
                     
                     // parse incoming entry
-                    Entry unsavedEntry = parseEntry(
-                            new InputStreamReader(req.getInputStream()));
+                    Entry unsavedEntry = parseEntry(new BufferedReader(
+                        new InputStreamReader(
+                            req.getInputStream(), "UTF-8")));
                     
                     // call handler to put entry
                     Entry updatedEntry = handler.putEntry(pathInfo, unsavedEntry);



Mime
View raw message