summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ftp/ftp_ctrl_response_buffer.cc15
-rw-r--r--net/ftp/ftp_network_transaction.cc3
2 files changed, 18 insertions, 0 deletions
diff --git a/net/ftp/ftp_ctrl_response_buffer.cc b/net/ftp/ftp_ctrl_response_buffer.cc
index b60ae81..02f9908 100644
--- a/net/ftp/ftp_ctrl_response_buffer.cc
+++ b/net/ftp/ftp_ctrl_response_buffer.cc
@@ -8,6 +8,19 @@
#include "base/string_util.h"
#include "net/base/net_errors.h"
+namespace {
+
+// TODO(phajdan.jr): Remove when http://crbug.com/18036 is diagnosed.
+void LogResponse(const net::FtpCtrlResponse& response) {
+ DLOG(INFO) << "received response with code " << response.status_code;
+ for (std::vector<std::string>::const_iterator i = response.lines.begin();
+ i != response.lines.end(); ++i) {
+ DLOG(INFO) << "line [" << *i << "]";
+ }
+}
+
+} // namespace
+
namespace net {
// static
@@ -31,6 +44,7 @@ int FtpCtrlResponseBuffer::ConsumeData(const char* data, int data_length) {
} else {
response_buf_.status_code = line.status_code;
response_buf_.lines.push_back(line.status_text);
+ LogResponse(response_buf_);
responses_.push(response_buf_);
// Prepare to handle following lines.
@@ -50,6 +64,7 @@ int FtpCtrlResponseBuffer::ConsumeData(const char* data, int data_length) {
if (!line.is_multiline) {
response_buf_.lines.push_back(line_buf_);
+ LogResponse(response_buf_);
responses_.push(response_buf_);
// Prepare to handle following lines.
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc
index e885d92..ff80fde 100644
--- a/net/ftp/ftp_network_transaction.cc
+++ b/net/ftp/ftp_network_transaction.cc
@@ -138,6 +138,9 @@ int FtpNetworkTransaction::SendFtpCommand(const std::string& command,
int FtpNetworkTransaction::ProcessCtrlResponse() {
FtpCtrlResponse response = ctrl_response_buffer_.PopResponse();
+ // TODO(phajdan.jr): Remove when http://crbug.com/18036 is diagnosed.
+ DLOG(INFO) << "Consumed one control response.";
+
// We always expect only one response, even if it's multiline.
DCHECK(!ctrl_response_buffer_.ResponseAvailable());