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);


Reply via email to