[Mono-bugs] [Bug 37630][Maj] New - HttpWebRequest problem and different behaviour than MS SDK

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 4 Feb 2003 23:28:41 -0500 (EST)


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 kiwnix@yahoo.es.

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

--- shadow/37630	Tue Feb  4 23:28:40 2003
+++ shadow/37630.tmp.18508	Tue Feb  4 23:28:40 2003
@@ -0,0 +1,118 @@
+Bug#: 37630
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: CVS head
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: kiwnix@yahoo.es               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: HttpWebRequest problem and different behaviour than MS SDK
+
+Description of Problem:
+When using POST in HttpWebRequest the sended HTTP is different in mono, and
+  generate a Unhandled Exception.
+
+It looks like is something related to the order of async calls.
+
+Actual Results:
+
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was requiredin <0x0060d> 00
+System.Net.HttpWebResponse:.ctor (System.Uri,string,System.IO.Stream)
+in <0x001eb> 00 System.Net.HttpWebRequest:GetResponseInternal ()
+in <0x00060> 01 System.MulticastDelegate:invoke_WebResponse ()
+ 
+Exception Rethrown at:
+in (unmanaged) 03
+System.MulticastDelegate:end_invoke_WebResponse_IAsyncResult
+(System.IAsyncResult)
+in <0x00004> 03
+System.MulticastDelegate:end_invoke_WebResponse_IAsyncResult
+(System.IAsyncResult)
+in <0x0011c> 00 System.Net.HttpWebRequest:EndGetResponse (System.IAsyncResult)
+in <0x000e4> 00 System.Net.HttpWebRequest:GetResponse ()
+in <0x000b6> 00 Notas.Requester:Exec ()
+in <0x00041> 00 .prueba:Main ()
+
+
+Expected Results:
+
+HTTP Server response printed.
+
+
+Additional Information:
+
+Test Case (attach), TCP Stream decoded (mono and .net)
+
+
+---[MONO Stream]---
+
+
+POST /ServletExpediente HTTP/1.1
+Cookie: JSESSIONID=9A820C4D1984D5560EEAAF977B22C160
+Host: www.upsam.net
+Date: Wed, 05 Feb 2003 04:20:53 GMT
+Expect: 100-continue
+Connection: Close
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 22
+Referer: http://www.upsam.net/WebExpediente/IniExpedienteInternet.jsp
+
+Tipo=CDNI&nDni=0000000HTTP/1.1 100 Continue
+
+HTTP/1.1 200 OK
+X-Cocoon-Version: 2.0.3
+Set-Cookie: JSESSIONID=A2EB4BF82078EC6039220EC976458A4B; Path=/
+Content-Type: text/html
+Transfer-Encoding: chunked
+Date: Wed, 05 Feb 2003 04:18:34 GMT
+Server: Apache Coyote/1.0
+
+608
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <!-- HTML CODE -->
+</html>
+0
+
+---[END MONO STREAM]---
+
+---[MS STREAM]---
+
+POST /ServletExpediente HTTP/1.1
+Cookie: JSESSIONID=9A820C4D1984D5560EEAAF977B22C160
+Content-Type: application/x-www-form-urlencoded
+Referer: http://www.upsam.net/WebExpediente/IniExpedienteInternet.jsp
+User-Agent: GNOTAS NOTAS FOR .NET (Made in MONO)
+Content-Length: 25
+Expect: 100-continue
+Connection: Close
+Host: www.upsam.net
+
+HTTP/1.1 100 Continue
+
+Tipo=CDNI&nDni=0022334555HTTP/1.1 200 OK
+X-Cocoon-Version: 2.0.3
+Set-Cookie: JSESSIONID=E83B9F14B2FA2EECBF981852D3D038FA; Path=/
+Content-Type: text/html
+Transfer-Encoding: chunked
+Date: Wed, 05 Feb 2003 04:21:23 GMT
+Server: Apache Coyote/1.0
+
+608
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <!-- HTML CODE -->
+</html>
+0
+
+
+---[END MS STREAM]---