Author: miguel
Date: 2007-12-03 03:18:17 -0500 (Mon, 03 Dec 2007)
New Revision: 90541
Modified:
branches/mono-1-2-6/mcs/class/System/System.Net/ChangeLog
branches/mono-1-2-6/mcs/class/System/System.Net/FtpWebRequest.cs
Log:
2007-12-03 Miguel de Icaza <[EMAIL PROTECTED]>
* FtpWebRequest.cs: Applied patch from Jerome Haltom that fixes
multi-line responses (after my fix).
Closes #333978
Modified: branches/mono-1-2-6/mcs/class/System/System.Net/ChangeLog
===================================================================
--- branches/mono-1-2-6/mcs/class/System/System.Net/ChangeLog 2007-12-03
08:18:01 UTC (rev 90540)
+++ branches/mono-1-2-6/mcs/class/System/System.Net/ChangeLog 2007-12-03
08:18:17 UTC (rev 90541)
@@ -1,3 +1,10 @@
+2007-12-03 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * FtpWebRequest.cs: Applied patch from Jerome Haltom that fixes
+ multi-line responses (after my fix).
+
+ Closes #333978
+
2007-11-16 Marek Habersack <[EMAIL PROTECTED]>
* HttpWebRequest.cs: when folding a request into a GET one, set
Modified: branches/mono-1-2-6/mcs/class/System/System.Net/FtpWebRequest.cs
===================================================================
--- branches/mono-1-2-6/mcs/class/System/System.Net/FtpWebRequest.cs
2007-12-03 08:18:01 UTC (rev 90540)
+++ branches/mono-1-2-6/mcs/class/System/System.Net/FtpWebRequest.cs
2007-12-03 08:18:17 UTC (rev 90541)
@@ -1006,22 +1006,18 @@
if (response [3] == '-'){
string line = null;
+ string find = code.ToString() + ' ';
while (true){
try {
line =
controlReader.ReadLine();
} catch (IOException) {
}
- if (line == null ||
response.Length < 3)
+ if (line == null)
return
ServiceNotAvailable ();
response += Environment.NewLine
+ line;
- if (line.Length < 3)
- break;
- if (!Int32.TryParse
(line.Substring (0, 3), out fcode))
- return
ServiceNotAvailable ();
-
- if (code == fcode && line[3] ==
' ')
+ if (line.StartsWith(find,
StringComparison.Ordinal))
break;
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches