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

Side by Side Diff: net/ftp/ftp_network_transaction.cc

Issue 293049: Fix compatibility problems with FileZilla FTP Server. (Closed)
Patch Set: Created 11 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "net/ftp/ftp_network_transaction.h" 5 #include "net/ftp/ftp_network_transaction.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "net/base/connection_type_histograms.h" 9 #include "net/base/connection_type_histograms.h"
10 #include "net/base/escape.h" 10 #include "net/base/escape.h"
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 case ERROR_CLASS_PERMANENT_ERROR: 916 case ERROR_CLASS_PERMANENT_ERROR:
917 // Code 550 means "Failed to open file". Other codes are unrelated, 917 // Code 550 means "Failed to open file". Other codes are unrelated,
918 // like "Not logged in" etc. 918 // like "Not logged in" etc.
919 if (response.status_code != 550) 919 if (response.status_code != 550)
920 return Stop(ERR_FAILED); 920 return Stop(ERR_FAILED);
921 921
922 DCHECK(!retr_failed_); // Should not get here twice. 922 DCHECK(!retr_failed_); // Should not get here twice.
923 retr_failed_ = true; 923 retr_failed_ = true;
924 924
925 // It's possible that RETR failed because the path is a directory. 925 // It's possible that RETR failed because the path is a directory.
926 // Try CWD next, to see if that's the case. 926 // We're going to try CWD next, but first send a PASV one more time,
927 next_state_ = STATE_CTRL_WRITE_CWD; 927 // because some FTP servers, including FileZilla, require that.
928 // See http://crbug.com/25316.
929 next_state_ = STATE_CTRL_WRITE_PASV;
wtc 2009/10/22 22:15:29 It's not clear how we arrange to try CWD after the
928 break; 930 break;
929 default: 931 default:
930 NOTREACHED(); 932 NOTREACHED();
931 return Stop(ERR_UNEXPECTED); 933 return Stop(ERR_UNEXPECTED);
932 } 934 }
933 return OK; 935 return OK;
934 } 936 }
935 937
936 // MDMT command 938 // MDMT command
937 int FtpNetworkTransaction::DoCtrlWriteMDTM() { 939 int FtpNetworkTransaction::DoCtrlWriteMDTM() {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 read_data_buf_->data()[0] = 0; 1084 read_data_buf_->data()[0] = 0;
1083 return data_socket_->Read(read_data_buf_, read_data_buf_len_, 1085 return data_socket_->Read(read_data_buf_, read_data_buf_len_,
1084 &io_callback_); 1086 &io_callback_);
1085 } 1087 }
1086 1088
1087 int FtpNetworkTransaction::DoDataReadComplete(int result) { 1089 int FtpNetworkTransaction::DoDataReadComplete(int result) {
1088 return result; 1090 return result;
1089 } 1091 }
1090 1092
1091 } // namespace net 1093 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/ftp/ftp_network_transaction_unittest.cc » ('j') | net/ftp/ftp_network_transaction_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698