From 4b5e1cebe749e77d94d1a10726bc0812e293e62c Mon Sep 17 00:00:00 2001 From: "neeti%netscape.com" Date: Fri, 6 Sep 2002 20:23:00 +0000 Subject: [PATCH] fix for bug 141784, ftp.gigo.com does not connect, r=dougt, sr=darin, a=rjesup@wgate.com --- netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp b/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp index 6877054a61e5..3205a0257951 100644 --- a/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp +++ b/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp @@ -495,15 +495,15 @@ nsFtpState::OnDataAvailable(nsIRequest *request, const char* currLine = lines.get(); while (*currLine) { - const char* eol = strstr(currLine, CRLF); + const char* eol = strchr(currLine, nsCRT::LF); if (!eol) { mControlReadCarryOverBuf.Assign(currLine); break; } - // Append the current segment, including the CRLF + // Append the current segment, including the LF nsCAutoString line; - line.Assign(currLine, eol - currLine + 2); + line.Assign(currLine, eol - currLine + 1); // Does this start with a response code? PRBool startNum = (line.Length() >= 3 && @@ -542,7 +542,7 @@ nsFtpState::OnDataAvailable(nsIRequest *request, if (NS_FAILED(rv)) return rv; } - currLine = eol+2; // CR+LF + currLine = eol+1; // +LF } return NS_OK; @@ -981,8 +981,8 @@ return rv; /////////////////////////////////// nsresult nsFtpState::S_user() { - // some servers on connect send us a 421. (84525) - if (mResponseCode == 421) + // some servers on connect send us a 421 or 521. (84525) (141784) + if ((mResponseCode == 421) || (mResponseCode == 521)) return NS_ERROR_FAILURE; nsresult rv;