Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46051
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 2 Nov 2008 00:48:28 +0000 (00:48 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 2 Nov 2008 00:48:28 +0000 (00:48 +0000)
The PrintWriter interface requires that the line separator is platform dependant. Not that this makes much sense for a web application but there is a spec so we shoud stick to it.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@709821 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/connector/CoyoteWriter.java

index 513f2fb..389d8e4 100644 (file)
@@ -32,8 +32,10 @@ public class CoyoteWriter
 
     // -------------------------------------------------------------- Constants
 
-
-    private static final char[] LINE_SEP = { '\r', '\n' };
+    // No need for a do privileged block - every web app has permission to read
+    // this by default
+    private static final char[] LINE_SEP =
+        System.getProperty("line.separator").toCharArray();
 
 
     // ----------------------------------------------------- Instance Variables