https://bugzilla.novell.com/show_bug.cgi?id=465613
Summary: HttpWebRequest.BeginGetRequestStream throws
ProtocolViolationException
Classification: Mono
Product: Mono: Class Libraries
Version: 2.0.x
Platform: x86
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Found By: Development
Description of Problem:
HttpWebRequest.BeginGetRequestStream throws ProtocolViolationException. This
behavior is different from HttpWebRequest implementation on .NET, and prohibits
scenarios where KeepAlive and Buffering is not desired.
Steps to reproduce the problem:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new
Uri("http://mono-project.com"));
request.Method = "POST";
request.ProtocolVersion = HttpVersion.Version11;
request.KeepAlive = false;
request.AllowWriteStreamBuffering = false;
request.ContentLength = 45;
try
{
request.BeginGetRequestStream(null, null);
}
catch (ProtocolViolationException ex)
{
Console.WriteLine("UnexpectedException thrown", ex);
}
Actual Results:
ProtocolViolationException saying that Content Length has not been set.
Expected Results:
No exception thrown.
How often does this happen?
Every time.
Additional Information:
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs