[Mono-bugs] [Bug 333978] FtpWebRequest does not handle responses with multiple lines

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Nov 30 11:37:51 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=333978#c8





--- Comment #8 from Jerome Haltom <wasabi at larvalstage.net>  2007-11-30 09:37:51 MST ---
Miguel, I believe your changes break this completely!

On line 1021 you say:


if (!Int32.TryParse (line.Substring (0, 3), out fcode))
        return ServiceNotAvailable ();

You run this once per sub-line. Lines between the first and last line will not
have numbers on them! Only the first line and the last line will. And the last
line MUST have a - in the 4th character position:

220 Hello and welcome to myserver
    I can put a lot of stuff here.
    More stuff
220-Okay, last line.


The inner while loop needs to continue until a line with the Same Code and a -
is detected. Another problem spotted:

if (code == fcode && line[3] == ' ')
        break;

The 4th position should be a '-', not ' '.


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


More information about the mono-bugs mailing list