Author: gonzalo
Date: 2005-04-09 16:49:34 -0400 (Sat, 09 Apr 2005)
New Revision: 42747

Added:
   trunk/mcs/class/Mono.Security/Test/tools/postecho/sendback.ashx
Modified:
   trunk/mcs/class/Mono.Security/Test/tools/postecho/ChangeLog
Log:
2005-04-09 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>

        * sendback.ashx: yet another handler to test with.



Modified: trunk/mcs/class/Mono.Security/Test/tools/postecho/ChangeLog
===================================================================
--- trunk/mcs/class/Mono.Security/Test/tools/postecho/ChangeLog 2005-04-09 
20:45:29 UTC (rev 42746)
+++ trunk/mcs/class/Mono.Security/Test/tools/postecho/ChangeLog 2005-04-09 
20:49:34 UTC (rev 42747)
@@ -1,3 +1,7 @@
+2005-04-09 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * sendback.ashx: yet another handler to test with.
+
 2005-04-07  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * postmulti.cs: New. Async POST tests using HttpWebRequest.

Added: trunk/mcs/class/Mono.Security/Test/tools/postecho/sendback.ashx
===================================================================
--- trunk/mcs/class/Mono.Security/Test/tools/postecho/sendback.ashx     
2005-04-09 20:45:29 UTC (rev 42746)
+++ trunk/mcs/class/Mono.Security/Test/tools/postecho/sendback.ashx     
2005-04-09 20:49:34 UTC (rev 42747)
@@ -0,0 +1,45 @@
+<%@ WebHandler Language="c#" class="XSPTest.SendBack" %>
+
+using System;
+using System.IO;
+using System.Web;
+
+namespace XSPTest
+{
+       public class SendBack : IHttpHandler
+       {
+               public void ProcessRequest (HttpContext context)
+               {
+                       // Replies with the content of the TEST form variable.
+                       ProcessRequestTestVar (context);
+                       // Replies with all the contents in the input stream
+                       //ProcessRequestAll (context);
+               }
+
+               void ProcessRequestTestVar (HttpContext context)
+               {
+                       string test = context.Request ["TEST"];
+                       context.Response.Write (test);
+                       Console.WriteLine ("Done writing a string of {0} 
characters.", (test != null) ? test.Length : 0);
+               }
+
+               void ProcessRequestAll (HttpContext context)
+               {
+                       byte [] bytes = new byte [10240];
+                       Stream input = context.Request.InputStream;
+                       Stream output = context.Response.OutputStream;
+                       int nread;
+                       int total = 0;
+                       while ((nread = input.Read (bytes, 0, 10240)) > 0) {
+                               output.Write (bytes, 0, nread);
+                               total += nread;
+                       }
+                       Console.WriteLine ("Done writing {0} bytes.", total);
+               }
+
+               public bool IsReusable {
+                       get { return true; }
+               }
+       }
+}
+

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

Reply via email to