[Mono-bugs] [Bug 61184][Nor] Changed - XmlRpcCS client/server interaction hangs when using Mono

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 5 Jul 2004 22:11:45 -0400 (EDT)


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 mattb@columbia.edu.

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

--- shadow/61184	2004-07-05 20:49:58.000000000 -0400
+++ shadow/61184.tmp.2905	2004-07-05 22:11:45.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 61184
 Product: Mono: Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: OS X 10.3.4: Darwin localhost.local 7.4.0 Darwin Kernel Version 7.4.0: Wed May 12 16:58:24 PDT 2004; root:xnu/xnu-517.7.7.obj~7/RELEASE_PPC  Power Macintosh powerpc
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: Sys.XML
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: mattb@columbia.edu               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -116,6 +116,46 @@
 if there was something I missed....
 
 ------- Additional Comments From mattb@columbia.edu  2004-07-05 20:49 -------
 Created an attachment (id=8461)
 server/client hang test file
 
+
+------- Additional Comments From mattb@columbia.edu  2004-07-05 22:11 -------
+Note: the client ultimately calls Nwc.XmlRpc.XmlRpcRequest.Send() to
+do its work (slightly reformatted for bug):
+
+    public XmlRpcResponse Send(String url)
+    {
+        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
+        if (request == null)
+            throw new XmlRpcException(XmlRpcErrorCodes.TRANSPORT_ERROR,
+                XmlRpcErrorCodes.TRANSPORT_ERROR_MSG
+                +": Could not create request with " + url);
+        request.Method = "POST";
+        request.ContentType = "text/xml";
+        request.AllowWriteStreamBuffering = true;
+        
+        Stream stream = request.GetRequestStream();
+        XmlTextWriter xml = new XmlTextWriter(stream, _encoding);
+        _serializer.Serialize(xml, this);
+        xml.Flush();
+        xml.Close();
+        
+        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+        StreamReader input = new
+StreamReader(response.GetResponseStream());
+        
+        XmlRpcResponse resp =
+(XmlRpcResponse)_deserializer.Deserialize(input);
+        input.Close();
+        response.Close();
+        return resp;
+    }
+
+Note the calls to Flush() and Close() for the XmlTextWriter. The only
+reason I point this out is to suggest that the library is actually
+doing the right thing here.
+
+Or I could be barking up the wrong tree, and it could be the server
+who's blocking, but either way, I think on the face of it, the library
+does the right thing.