Do not depend on system encoding settings when running Tomcat tests.
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 8 Apr 2011 01:55:51 +0000 (01:55 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 8 Apr 2011 01:55:51 +0000 (01:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1090083 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/catalina/startup/SimpleHttpClient.java

index f4e9545..e0775e8 100644 (file)
@@ -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 {