tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1090083 - /tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
Date Fri, 08 Apr 2011 01:55:51 GMT
Author: kkolinko
Date: Fri Apr  8 01:55:51 2011
New Revision: 1090083

URL: http://svn.apache.org/viewvc?rev=1090083&view=rev
Log:
Do not depend on system encoding settings when running Tomcat tests.

Modified:
    tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java?rev=1090083&r1=1090082&r2=1090083&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java Fri Apr  8 01:55:51
2011
@@ -117,14 +117,15 @@ public abstract class SimpleHttpClient {
     }
 
     public void connect(int connectTimeout, int soTimeout) throws UnknownHostException, IOException
{
+        final String encoding = "ISO-8859-1";
         SocketAddress addr = new InetSocketAddress("localhost", port);
         socket = new Socket();
         socket.setSoTimeout(soTimeout);
         socket.connect(addr,connectTimeout);
         OutputStream os = socket.getOutputStream();
-        writer = new OutputStreamWriter(os);
+        writer = new OutputStreamWriter(os, encoding);
         InputStream is = socket.getInputStream();
-        Reader r = new InputStreamReader(is);
+        Reader r = new InputStreamReader(is, encoding);
         reader = new BufferedReader(r);
     }
     public void connect() throws UnknownHostException, IOException {



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


Mime
View raw message