svn commit: r712145 - /xml/xindice/trunk/java/src/org/apache/xindice/webadmin/webdav/components/Get.java

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: natalia
Date: Fri Nov  7 06:55:56 2008
New Revision: 712145

URL: http://svn.apache.org/viewvc?rev=712145&view=rev
Log:
Fixed encoding for displaying document source

Modified:
    xml/xindice/trunk/java/src/org/apache/xindice/webadmin/webdav/components/Get.java

Modified: xml/xindice/trunk/java/src/org/apache/xindice/webadmin/webdav/components/Get.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/webadmin/webdav/components/Get.java?rev=712145&r1=712144&r2=712145&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/webadmin/webdav/components/Get.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/webadmin/webdav/components/Get.java Fri Nov  7 06:55:56 2008
@@ -64,7 +64,7 @@
 
                     byte[] resultBytes;
                     if (resource.getEntryType() == Entry.DOCUMENT) {
-                        resultBytes = TextWriter.toString((Document) resource.getValue()).getBytes();
+                        resultBytes = TextWriter.toString((Document) resource.getValue()).getBytes("utf-8");
                         res.setContentType(MimeTable.XML_MIME_TYPE);
                     } else {
                         resultBytes = (byte[]) resource.getValue();
@@ -80,7 +80,7 @@
                     output.write(resultBytes);
                     output.flush();
                 } else {
-                    res.setStatus(HttpServletResponse.SC_NOT_FOUND);
+                    res.sendError(HttpServletResponse.SC_NOT_FOUND);
                 }
             } catch (DBException e) {
                 log.error("Could not get resource " + name + " from collection " + col.getCanonicalName(), e);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.