[Mono-bugs] [Bug 50530][Min] New - Authenticated POST requests do not work with HTTP/1.0 servers
Mon, 3 Nov 2003 19:41:25 -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 email@example.com.
--- shadow/50530 2003-11-03 19:41:25.000000000 -0500
+++ shadow/50530.tmp.16000 2003-11-03 19:41:25.000000000 -0500
@@ -0,0 +1,83 @@
+Product: Mono/Class Libraries
+OS: SuSE 8.1
+Summary: Authenticated POST requests do not work with HTTP/1.0 servers
+Description of Problem:
+I'll try to send an XML-RPC request to the OpenGroupware.org XML-RPC
+daemon. This apparently fails due to: a) the OGo daemon not implementing
+HTTP/1.1, or more exactly the Expect: 100-continue things and b) Mono
+apparently not properly dealing with HTTP/1.0 responses.
+Steps to reproduce the problem:
+1. connect OGo XML-RPC daemon with System.Net.WebRequest and POST,
+ actual content is irrelevant
+Mono hangs in:
+END: SendRequestHeaders: System.Net.HttpWebRequest
+nread == 0: may be the connection was closed?
+System.Exception: Exception occured while sending request. --->
+System.Net.WebException: The request timed out
+in <0x001de> System.Net.HttpWebRequest:EndGetResponse (System.IAsyncResult)
+in <0x000fb> System.Net.HttpWebRequest:GetResponse ()
+in <0x001ca> .httpclient:Main ()
+--- End of inner exception stack trace ---
+in <0x002e6> .httpclient:Main ()
+Ack of the 401 sent by the server by reissuing the request with the proper
+How often does this happen?
+Mono generates this:
+POST /RPC2 HTTP/1.1
+and my server reponds that:
+HTTP/1.0 401 Authorization Required
+www-authenticate: basic realm="SKYRiX"
+This makes Mono hang. I do not (yet) fully understand how 100-continue is
+supposed to work, but I guess that Mono is waiting for a "HTTP/1.1 100
+Continue" response which I am of course not sending as a HTTP/1.0 server.
+The HTTP/1.1 spec suggest that some ambitious condition may arise here?
+I'm not yet sure what the intended behaviour is according to the HTTP/1.1
+spec, but I guess as soon as I say that I'm HTTP/1.0, Mono should not
+continue doing 100-continue processing and at least should print a warning
+I _think_ (not sure) that I'm not doing anything illegal in my response, so
+I prefer blaming Mono ;-)
+Personally I wonder whether Mono should just assume HTTP/1.0 until it knows
+for certain that the peer is a HTTP/1.1 server since most servers
+(especially application servers) are still HTTP/1.0 in practice.