Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1530)

Unified Diff: net/ftp/ftp_ctrl_response_buffer.h

Issue 467032: net/ftp: Fix control response parsing for a corner cases where the first line... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/ftp/ftp_ctrl_response_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_ctrl_response_buffer.h
===================================================================
--- net/ftp/ftp_ctrl_response_buffer.h (revision 33979)
+++ net/ftp/ftp_ctrl_response_buffer.h (working copy)
@@ -24,7 +24,8 @@
class FtpCtrlResponseBuffer {
public:
- FtpCtrlResponseBuffer() {}
+ FtpCtrlResponseBuffer() : multiline_(false) {
+ }
// Called when data is received from the control socket. Returns error code.
int ConsumeData(const char* data, int data_length);
@@ -81,6 +82,9 @@
std::queue<ParsedLine> lines_;
+ // True if we are in the middle of parsing a multi-line response.
+ bool multiline_;
+
// When parsing a multiline response, we don't know beforehand if a line
// will have a continuation. So always store last line of multiline response
// so we can append the continuation to it.
Property changes on: net/ftp/ftp_ctrl_response_buffer.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « no previous file | net/ftp/ftp_ctrl_response_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698