Author: gonzalo
Date: 2005-05-03 13:25:49 -0400 (Tue, 03 May 2005)
New Revision: 43952
Modified:
trunk/mcs/class/System/System.Net/ChangeLog
trunk/mcs/class/System/System.Net/WebConnection.cs
trunk/mcs/class/System/System.Net/WebConnectionStream.cs
Log:
2005-05-03 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* WebConnection.cs: removed a 'slightly' important line by mistake.
* WebConnectionStream.cs: if the transfer encoding is chunked, ignore
content-length header if present.
Modified: trunk/mcs/class/System/System.Net/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net/ChangeLog 2005-05-03 17:16:22 UTC (rev
43951)
+++ trunk/mcs/class/System/System.Net/ChangeLog 2005-05-03 17:25:49 UTC (rev
43952)
@@ -1,5 +1,11 @@
2005-05-03 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+ * WebConnection.cs: removed a 'slightly' important line by mistake.
+ * WebConnectionStream.cs: if the transfer encoding is chunked, ignore
+ content-length header if present.
+
+2005-05-03 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
* WebConnection.cs: no need to use an AutoResetEvent.
* WebConnectionStream.cs: don't start any more reads on the socket
after getting a 0 signalling the end. This fixes Ben's infamous foo.cs
Modified: trunk/mcs/class/System/System.Net/WebConnection.cs
===================================================================
--- trunk/mcs/class/System/System.Net/WebConnection.cs 2005-05-03 17:16:22 UTC
(rev 43951)
+++ trunk/mcs/class/System/System.Net/WebConnection.cs 2005-05-03 17:25:49 UTC
(rev 43952)
@@ -581,6 +581,7 @@
Close (false);
}
+ busy = false;
SendNext ();
}
}
Modified: trunk/mcs/class/System/System.Net/WebConnectionStream.cs
===================================================================
--- trunk/mcs/class/System/System.Net/WebConnectionStream.cs 2005-05-03
17:16:22 UTC (rev 43951)
+++ trunk/mcs/class/System/System.Net/WebConnectionStream.cs 2005-05-03
17:25:49 UTC (rev 43952)
@@ -67,8 +67,11 @@
pending = new ManualResetEvent (true);
this.request = cnc.Data.request;
this.cnc = cnc;
+ string contentType = cnc.Data.Headers
["Transfer-Encoding"];
+ bool chunkedRead = (contentType != null &&
contentType.ToLower ().IndexOf ("chunked") != -1);
string clength = cnc.Data.Headers ["Content-Length"];
- if (clength != null && clength != "") {
+ if (!chunkedRead && clength != null && clength != "") {
+
try {
contentLength = Int32.Parse (clength);
} catch {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches