[Mono-bugs] [Bug 77465][Wis] New - System.Net.WebRequest exceptions on POST with SSL'ed connections

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Feb 3 17:13:42 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by brad at getcoded.net.

http://bugzilla.ximian.com/show_bug.cgi?id=77465

--- shadow/77465	2006-02-03 17:13:42.000000000 -0500
+++ shadow/77465.tmp.19887	2006-02-03 17:13:42.000000000 -0500
@@ -0,0 +1,68 @@
+Bug#: 77465
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: brad at getcoded.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Net.WebRequest exceptions on POST with SSL'ed connections 
+
+A POST to a SSL'ed webpage gives a "Error writing request" exception
+whereas .Net on Windows prints out expected output.
+
+Test case:
+using System;
+using System.IO;
+using System.Net;
+
+public class Test
+{
+        public static void Main (string[] args)
+        {
+                WebRequest req = System.Net.WebRequest.Create
+("https://secure.medsphere.com/post-test/index.php");
+                req.ContentType = "application/x-www-form-urlencoded";
+                req.Method = "POST";
+
+                byte[] form_params = System.Text.Encoding.ASCII.GetBytes
+("g=mono");
+                req.ContentLength = form_params.Length;
+
+                Stream os = req.GetRequestStream ();
+                os.Write (form_params, 0, form_params.Length);
+                os.Close ();
+
+                WebResponse resp = req.GetResponse ();
+                if (resp == null) {
+                        Console.WriteLine ("Got no response");
+                        return;
+                }
+
+                StreamReader sr = new StreamReader (resp.GetResponseStream ());
+                Console.WriteLine (sr.ReadToEnd ().Trim ());
+        }
+}
+
+Mono 1.1.13.2 on Linux:
+Unhandled Exception: System.Net.WebException: Error writing request.
+in <0x00241> System.Net.WebConnectionStream:WriteRequest ()
+in <0x0013b> System.Net.WebConnectionStream:Close ()
+in <0x000a6> Test:Main (System.String[] args)
+
+
+.Net 1.1.4322 on Windows:
+Array
+(
+    [g] => mono
+)
+
+If I don't use a SSL'ed link, mono performs as expected.


More information about the mono-bugs mailing list