2009-05-18 Miguel de Icaza <miguel@novell.com>
[mono.git] / mcs / class / System / System.Net / FtpWebResponse.cs
index c616065e8ab45e4e98c5087f0563b68cd42ebf1e..fe715922bc3de636afa99893d1f0e6706dda0dac 100644 (file)
@@ -127,17 +127,16 @@ namespace System.Net
                        if (disposed)
                                return;
                        
-                       disposed = true;\r
-                       if (stream != null)\r
+                       disposed = true;
+                       if (stream != null)
                                stream.Close ();
                        stream = null;
                }
 
                public override Stream GetResponseStream ()
                {
-                       if (stream == null) {
-                               throw new InvalidOperationException ();
-                       }
+                       if (stream == null)
+                               return Stream.Null; // After a STOR we get this
                        
                        if (method != WebRequestMethods.Ftp.DownloadFile &&
                                        method != WebRequestMethods.Ftp.ListDirectory)