tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1137322 - /tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
Date Sun, 19 Jun 2011 09:46:36 GMT
Author: markt
Date: Sun Jun 19 09:46:36 2011
New Revision: 1137322

URL: http://svn.apache.org/viewvc?rev=1137322&view=rev
Log:
Don't use println to write output since os differences will result in different numbers of
bytes output

Modified:
    tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java

Modified: tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1137322&r1=1137321&r2=1137322&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java (original)
+++ tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Sun Jun 19 09:46:36
2011
@@ -150,7 +150,7 @@ public class TestCometProcessor extends 
 
             if (event.getEventType() == EventType.BEGIN) {
                 response.setContentType("text/plain");
-                response.getWriter().println("BEGIN");
+                response.getWriter().print("BEGIN" + "\r\n");
             } else if (event.getEventType() == EventType.READ) {
                 InputStream is = request.getInputStream();
                 int count = 0;
@@ -159,13 +159,13 @@ public class TestCometProcessor extends 
                     count ++;
                 }
                 String msg = "READ: " + count + " bytes";
-                response.getWriter().println("Client: " + msg);
+                response.getWriter().print("Client: " + msg + "\r\n");
             } else if (event.getEventType() == EventType.END) {
                 String msg = "END";
-                response.getWriter().println("Client: " + msg);
+                response.getWriter().print("Client: " + msg + "\r\n");
                 event.close();
             } else {
-                response.getWriter().println(event.getEventSubType());
+                response.getWriter().print(event.getEventSubType() + "\r\n");
                 event.close();
             }
             response.getWriter().flush();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message