diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2009-06-28 08:03:49 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2009-06-28 08:03:49 +0400 |
commit | 08a92a49ebcabeacfa6d012e44ef811ddd0023a9 (patch) | |
tree | 20dc002badffec551e70f667ded6fc8772343a2c /mcs/class/System | |
parent | 0d6effc8d8870d46ea391eb0fe3ab68141deda77 (diff) |
2009-06-28 Gonzalo Paniagua Javier <gonzalo@novell.com>
* WebConnectionStream.cs: when buffering the response, we have to set
the internal length and regenerate the headers.
svn path=/trunk/mcs/; revision=137043
Diffstat (limited to 'mcs/class/System')
-rw-r--r-- | mcs/class/System/System.Net/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System/System.Net/WebConnectionStream.cs | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog index 42de7a584a8..1f1d60f5800 100644 --- a/mcs/class/System/System.Net/ChangeLog +++ b/mcs/class/System/System.Net/ChangeLog @@ -1,3 +1,8 @@ +2009-06-28 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * WebConnectionStream.cs: when buffering the response, we have to set + the internal length and regenerate the headers. + 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com> * HttpWebRequest.cs: don't send Content-Length header when SendChunked diff --git a/mcs/class/System/System.Net/WebConnectionStream.cs b/mcs/class/System/System.Net/WebConnectionStream.cs index b8f93b305c8..60aa236357d 100644 --- a/mcs/class/System/System.Net/WebConnectionStream.cs +++ b/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; |