* WebConnectionStream.cs: when buffering the response, we have to set the internal length and regenerate the headers. svn path=/trunk/mcs/; revision=137043
@@ -1,3 +1,8 @@
+2009-06-28 Gonzalo Paniagua Javier <[email protected]>
+
+ * WebConnectionStream.cs: when buffering the response, we have to set
+ the internal length and regenerate the headers.
2009-06-26 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: don't send Content-Length header when SendChunked
@@ -679,6 +679,10 @@ namespace System.Net
WebExceptionStatus.ServerProtocolViolation, null);
}
+ if (!headersSent) {
+ request.InternalContentLength = length;
+ request.SendRequestHeaders ();
+ }
WriteHeaders ();
if (cnc.Data.StatusCode != 0 && cnc.Data.StatusCode != 100)
return;