[Mono-bugs] [Bug 491590] The FTPWebRequest class doesn't properly resume file downloads

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Apr 6 13:33:25 EDT 2009


User josecoig at cae.net added comment

Jose Coig <josecoig at cae.net> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |

--- Comment #2 from Jose Coig <josecoig at cae.net>  2009-04-06 11:33:24 MDT ---
I believe the problem only occurs with certain FTP server configurations (in
this case, Windows servers with specific user home directories). The previous
mono releases had other problems with this configuration, that have already
been resolved (see bug 466530).

We have set up an ftp account on our server, so that you can see this yourself.
Please try running the following code:

FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create
ftp.Credentials = new NetworkCredential ("mono", "monot3st");
ftp.Method = WebRequestMethods.Ftp.DownloadFile;
ftp.ContentOffset = 5;
FtpWebResponse response = (FtpWebResponse)ftp.GetResponse ();
StreamReader sr = new StreamReader (response.GetResponseStream (),
Console.WriteLine (sr.ReadToEnd());
sr.Close ();
response.Close ();

The file "test.txt" contains a single line of text: "1234567890". The code
reads this file from offset 5, and prints it to the console. 

When running this code on Windows .Net, the return value is "67890", but when
running this on mono (on Mac OS X 10.5), the return value is "1234567890".

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list