summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/url_request/url_request_new_ftp_job.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/url_request/url_request_new_ftp_job.cc b/net/url_request/url_request_new_ftp_job.cc
index a6b5e9f..0083e23 100644
--- a/net/url_request/url_request_new_ftp_job.cc
+++ b/net/url_request/url_request_new_ftp_job.cc
@@ -284,6 +284,11 @@ int URLRequestNewFtpJob::ProcessFtpDir(net::IOBuffer *buf,
}
void URLRequestNewFtpJob::LogFtpServerType(const net::ListState& list_state) {
+ // We can't recognize server type based on empty directory listings. Don't log
+ // that as unknown, it's misleading.
+ if (!list_state.parsed_one)
+ return;
+
switch (list_state.lstyle) {
case 'E':
net::UpdateFtpServerTypeHistograms(net::SERVER_EPLF);