| Index: net/ftp/ftp_ctrl_response_buffer.cc
|
| ===================================================================
|
| --- net/ftp/ftp_ctrl_response_buffer.cc (revision 33979)
|
| +++ net/ftp/ftp_ctrl_response_buffer.cc (working copy)
|
| @@ -21,22 +21,7 @@
|
| ParsedLine line = lines_.front();
|
| lines_.pop();
|
|
|
| - if (line_buf_.empty()) {
|
| - if (!line.is_complete)
|
| - return ERR_INVALID_RESPONSE;
|
| -
|
| - response_buf_.status_code = line.status_code;
|
| - if (line.is_multiline) {
|
| - line_buf_ = line.status_text;
|
| - } else {
|
| - response_buf_.lines.push_back(line.status_text);
|
| - responses_.push(response_buf_);
|
| -
|
| - // Prepare to handle following lines.
|
| - response_buf_ = FtpCtrlResponse();
|
| - line_buf_.clear();
|
| - }
|
| - } else {
|
| + if (multiline_) {
|
| if (!line.is_complete || line.status_code != response_buf_.status_code) {
|
| line_buf_.append(line.raw_text);
|
| continue;
|
| @@ -54,7 +39,24 @@
|
| // Prepare to handle following lines.
|
| response_buf_ = FtpCtrlResponse();
|
| line_buf_.clear();
|
| + multiline_ = false;
|
| }
|
| + } else {
|
| + if (!line.is_complete)
|
| + return ERR_INVALID_RESPONSE;
|
| +
|
| + response_buf_.status_code = line.status_code;
|
| + if (line.is_multiline) {
|
| + line_buf_ = line.status_text;
|
| + multiline_ = true;
|
| + } else {
|
| + response_buf_.lines.push_back(line.status_text);
|
| + responses_.push(response_buf_);
|
| +
|
| + // Prepare to handle following lines.
|
| + response_buf_ = FtpCtrlResponse();
|
| + line_buf_.clear();
|
| + }
|
| }
|
| }
|
|
|
|
|
| Property changes on: net/ftp/ftp_ctrl_response_buffer.cc
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|