Author: spouliot
Date: 2005-04-08 15:41:31 -0400 (Fri, 08 Apr 2005)
New Revision: 42702

Modified:
   trunk/mcs/class/Mono.Security/Test/tools/tlstest/ChangeLog
   trunk/mcs/class/Mono.Security/Test/tools/tlstest/tlsmulti.cs
Log:
2005-04-08  Sebastien Pouliot  <[EMAIL PROTECTED]> 

        * tlsmulti.cs: Display the web page if only one URL is supplied. Show
        usage if no URL is specified.



Modified: trunk/mcs/class/Mono.Security/Test/tools/tlstest/ChangeLog
===================================================================
--- trunk/mcs/class/Mono.Security/Test/tools/tlstest/ChangeLog  2005-04-08 
18:55:38 UTC (rev 42701)
+++ trunk/mcs/class/Mono.Security/Test/tools/tlstest/ChangeLog  2005-04-08 
19:41:31 UTC (rev 42702)
@@ -1,3 +1,8 @@
+2005-04-08  Sebastien Pouliot  <[EMAIL PROTECTED]> 
+
+       * tlsmulti.cs: Display the web page if only one URL is supplied. Show
+       usage if no URL is specified.
+
 2005-04-07  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * tlsmulti.cs: New. Async GET tests using HttpWebRequest.

Modified: trunk/mcs/class/Mono.Security/Test/tools/tlstest/tlsmulti.cs
===================================================================
--- trunk/mcs/class/Mono.Security/Test/tools/tlstest/tlsmulti.cs        
2005-04-08 18:55:38 UTC (rev 42701)
+++ trunk/mcs/class/Mono.Security/Test/tools/tlstest/tlsmulti.cs        
2005-04-08 19:41:31 UTC (rev 42702)
@@ -62,13 +62,19 @@
 
 public class MultiTest {
 
+       static bool alone;
+
        public static void Main (string[] args) 
        {
-               if (args.Length > 64) {
+               if (args.Length == 0) {
+                       Console.WriteLine ("usage: mono testmulti.exe url1 [url 
...]");
+                       return;
+               } else if (args.Length > 64) {
                        Console.WriteLine ("WaitHandle has a limit of 64 
handles so you cannot process {0} URLs.", args.Length);
                        return;
                }
 
+               alone = (args.Length == 1);
                ServicePointManager.CertificatePolicy = new 
TestCertificatePolicy ();
 
                int id = 1;
@@ -85,13 +91,15 @@
        private static void ResponseCallback (IAsyncResult result)
        {
                State state = ((State) result.AsyncState);
+               Console.WriteLine ("END #{0}", state.Id);
                HttpWebResponse response = (HttpWebResponse) 
state.Request.EndGetResponse (result);
 
                Stream stream = response.GetResponseStream ();
                StreamReader sr = new StreamReader (stream, Encoding.UTF8);
-               sr.ReadToEnd ();
+               string data = sr.ReadToEnd ();
 
-               Console.WriteLine ("END #{0}", state.Id);
+               if (alone)
+                       Console.WriteLine (data);
                state.Complete ();
        }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to