Pārlūkot izejas kodu

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.


svn path=/trunk/mcs/; revision=137043
Gonzalo Paniagua Javier 16 gadi atpakaļ
vecāks
revīzija
08a92a49eb

+ 5 - 0
mcs/class/System/System.Net/ChangeLog

@@ -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

+ 4 - 0
mcs/class/System/System.Net/WebConnectionStream.cs

@@ -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;