summaryrefslogtreecommitdiffstats
path: root/net/ftp
Commit message (Collapse)AuthorAgeFilesLines
* Fix recognizing FTP listings consisting of only one line.phajdan.jr@chromium.org2009-11-236-1/+57
| | | | | | | | | | | | | | It turns out we have to be a little more strict with that. Before this change both ls and VMS listing parsers would claim that they recognize the format. Also fallback to Mozilla code was broken in that case. TEST=Covered by net_unittests. BUG=28263 Review URL: http://codereview.chromium.org/421006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32831 0039d316-1c4b-4281-b951-d872f2087c98
* Fix one source of flakiness of FTP tests.phajdan.jr@chromium.org2009-11-232-0/+33
| | | | | | | | | | | | It turns out that similarly to RETR case, we can get two responses for LIST command, if the transfer finishes quickly enough. TEST=net_unittests BUG=25045 Review URL: http://codereview.chromium.org/436002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32823 0039d316-1c4b-4281-b951-d872f2087c98
* Add compiler-specific "examine printf format" attributes to printfs.evan@chromium.org2009-11-202-5/+7
| | | | | | | | | | | | Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
* Add histograms for data connection error types.phajdan.jr@chromium.org2009-11-172-0/+80
| | | | | | | | | | | | The plan is to see how many of them are possibly caused by the passive FTP mode being blocked in the network. TEST=none BUG=3073 Review URL: http://codereview.chromium.org/389023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32175 0039d316-1c4b-4281-b951-d872f2087c98
* There was confusion in the mock socket classes due tombelshe@google.com2009-11-111-190/+190
| | | | | | | | | | | | | | | | | | | overlapping names. The MockSocket is not actually a socket. It is an interface for fetching data for reads and writes on a socket. The MockClientSocket and MockTCPClientSocket are the actual sockets. Rename MockSocket to SocketDataProvider. Rename SSLMockSocket to SSLSocketDataProvider. Update all tests to reflect name change. BUG=none TEST=none Review URL: http://codereview.chromium.org/384024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31640 0039d316-1c4b-4281-b951-d872f2087c98
* Distinguish between old and new FTP LIST response parsersphajdan.jr@chromium.org2009-11-102-10/+18
| | | | | | | | | | | | in FTP histograms. This should allow us to see how compatible the new parser is. TEST=none BUG=25520 Review URL: http://codereview.chromium.org/384007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31591 0039d316-1c4b-4281-b951-d872f2087c98
* Use the new FTP LIST parsing code in the browser.phajdan.jr@chromium.org2009-11-073-6/+23
| | | | | | | | | | | Fall back to the old parsing code on errors. TEST=none BUG=25520 Review URL: http://codereview.chromium.org/343073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31379 0039d316-1c4b-4281-b951-d872f2087c98
* Disable an FTP test which contains a date with year 2079 due to year-2038 ↵phajdan.jr@chromium.org2009-11-071-0/+3
| | | | | | | | | | | | | | | | problem on Linux. The date wraps around then and gives nonsensical results (the field to store the timestamp is too short to store dates beyond year 2038). TBR=wtc TEST=none BUG=25520 Review URL: http://codereview.chromium.org/372044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31378 0039d316-1c4b-4281-b951-d872f2087c98
* Implement Windows FTP directory listing parser.phajdan.jr@chromium.org2009-11-075-2/+163
| | | | | | | | | TEST=Covered by net_unittests. BUG=25520 Review URL: http://codereview.chromium.org/374010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31376 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the "ls -l" FTP LIST format parser to understand correctlyphajdan.jr@chromium.org2009-11-064-2/+13
| | | | | | | | | | | listings sent by VMS MultiNet servers emulating Unix. TEST=Covered by net_unittests. BUG=22193, 25520 Review URL: http://codereview.chromium.org/368006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31217 0039d316-1c4b-4281-b951-d872f2087c98
* Second patch in making destructors of refcounted objects private.jam@chromium.org2009-11-051-0/+4
| | | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/368001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Fix leaking UCharsetDetector in ftp code.mattm@chromium.org2009-11-052-0/+2
| | | | | | | | | | CID=7193 BUG=none TEST=using the additional test data, tools/valgrind/chrome_tests.sh -t net --gtest_filter="FtpDirectoryListingBufferTest.*" Review URL: http://codereview.chromium.org/355037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31099 0039d316-1c4b-4281-b951-d872f2087c98
* Implement VMS FTP directory listing parser.phajdan.jr@chromium.org2009-11-045-79/+505
| | | | | | | | | | | | | This may not yet correctly handle all possible variants of VMS, because there multiple TCP/IP network stacks available for that system. TEST=Covered by net_unittests. BUG=22193, 25520 Review URL: http://codereview.chromium.org/348036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30995 0039d316-1c4b-4281-b951-d872f2087c98
* Add LoadLog to ClientSocket::Connect().willchan@chromium.org2009-11-021-2/+2
| | | | | | | | TODO: Use LoadLog in FLIP code. Review URL: http://codereview.chromium.org/344026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30765 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly handle FTP servers which unexpectedly close the control connection.phajdan.jr@chromium.org2009-11-022-0/+35
| | | | | | | | | TEST=Covered by net_unittests. BUG=25023 Review URL: http://codereview.chromium.org/340054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30693 0039d316-1c4b-4281-b951-d872f2087c98
* Also parse file size in new FTP LIST parsing code.phajdan.jr@chromium.org2009-10-294-15/+24
| | | | | | | | | TEST=Covered by net_unittests. BUG=25520 Review URL: http://codereview.chromium.org/343022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30445 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SCOPED_TRACE to not access memory in a wrong way.phajdan.jr@chromium.org2009-10-281-1/+1
| | | | | | | | | | TEST=Covered by net_unittests. BUG=25520 TBR=eroman Review URL: http://codereview.chromium.org/344015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30360 0039d316-1c4b-4281-b951-d872f2087c98
* First parts of new FTP LIST response parsing code.phajdan.jr@chromium.org2009-10-286-0/+621
| | | | | | | | | | | Added parser for "ls" listing style, and tests. This is not yet used by the browser (will do that in a following CL). TEST=Covered by net_unittests. BUG=25520 Review URL: http://codereview.chromium.org/244008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30354 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compatibility problems with FileZilla FTP Server.phajdan.jr@chromium.org2009-10-212-8/+31
| | | | | | | | | TEST=Covered by net_unittests. BUG=25316 Review URL: http://codereview.chromium.org/293049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29662 0039d316-1c4b-4281-b951-d872f2087c98
* A couple new io buffers that encapsulate more data and are therefore easier ↵vandebo@chromium.org2009-10-142-15/+8
| | | | | | | | | | | to use and easier to reason about. Inspired by RequestHeaders and ResponseHeaders in http_network_transaction.h Separated out of the refactoring of HttpNetworkTransaction to support pipelining. (http://codereview.chromium.org/249031) BUG=13289 TEST=none Review URL: http://codereview.chromium.org/264025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28978 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid potential "NULL used as int" warnings by changing ASSERT_EQ(NULL, ...) ↵pkasting@chromium.org2009-09-291-6/+6
| | | | | | | | | to ASSERT_TRUE(... == NULL). Patch by Jacob Mandelson (see http://codereview.chromium.org/202057 ), r=me. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27511 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly talk to VMS servers (translate UNIX paths to VMS and vice versa).phajdan.jr@chromium.org2009-09-246-12/+442
| | | | | | | | | | | | This way we get a native VMS listing and not a UNIX emulation mode, which is slightly different than native UNIX and confuses the parser. TEST=Covered by net_unittests. BUG=22193 Review URL: http://codereview.chromium.org/215058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27129 0039d316-1c4b-4281-b951-d872f2087c98
* Cache login identity for NewFTP transactions.phajdan.jr@chromium.org2009-09-223-86/+101
| | | | | | | | | TEST=net_unittests BUG=21184 Review URL: http://codereview.chromium.org/201083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26815 0039d316-1c4b-4281-b951-d872f2087c98
* Unescape FTP URL paths, Firefox-compatible.phajdan.jr@chromium.org2009-09-213-30/+55
| | | | | | | | | TEST=See bug. BUG=20304 Review URL: http://codereview.chromium.org/200145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26686 0039d316-1c4b-4281-b951-d872f2087c98
* Various cleanups FTP-related.phajdan.jr@chromium.org2009-09-182-28/+11
| | | | | | | | | | | | | - use better name for FTP LIST parsing code in about:credits - don't open a second data socket - add a comment explaining why we close the data socket at one point TEST=Covered by net_unittests. BUG=none Review URL: http://codereview.chromium.org/207014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26575 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 26419.tyoshino@google.com2009-09-173-102/+86
| | | | | | | | | | | | | | | | | | | | | | Looks like this CL caused failure in Modules Linux (valgrind) http://chrome-buildbot.corp.google.com:8010/builders/Modules%20Linux%20(valgrind)/builds/1104/steps/valgrind%20test:%20base/logs/stdio http://chrome-buildbot.corp.google.com:8010/builders/Modules%20Linux%20(valgrind)/builds/1103/steps/valgrind%20test:%20base/logs/stdio [----------] 6 tests from ClipboardTest [ RUN ] ClipboardTest.ClearTest command timed out: 1200 seconds without output, killing pid 7479 process killed by signal 9 program finished with exit code -1 TBR=phajdan.jr Review URL: http://codereview.chromium.org/212007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26430 0039d316-1c4b-4281-b951-d872f2087c98
* Cache login identity for NewFTP transactions.phajdan.jr@chromium.org2009-09-163-86/+102
| | | | | | | | | TEST=net_unittests BUG=21184 Review URL: http://codereview.chromium.org/201083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26419 0039d316-1c4b-4281-b951-d872f2087c98
* More correctly handle username and password in FtpNetworkTransaction.phajdan.jr@chromium.org2009-09-162-3/+143
| | | | | | | | | | | | - prevent newline injection attacks - correctly unescape credentials provided in the URL TEST=Covered by net_unittests. http://crbug.com/20336 Review URL: http://codereview.chromium.org/183046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26305 0039d316-1c4b-4281-b951-d872f2087c98
* Return ERR_FILE_NOT_FOUND from FtpNetworkTransaction when we can.phajdan.jr@chromium.org2009-09-092-3/+34
| | | | | | | | | | | This way it provides more specific error code for the user. TEST=Covered by net_unittests. http://crbug.com/20405 Review URL: http://codereview.chromium.org/197050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25771 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of the data socket completely when data transfer is finished.phajdan.jr@chromium.org2009-09-091-0/+4
| | | | | | | | | | | | Fixes an FTP transaction hang when we wait for server's response and the server apparently waits for us. TEST=See bug. http://crbug.com/21127 Review URL: http://codereview.chromium.org/192042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25750 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: use OK instead of 0 when checking return code in ↵phajdan.jr@chromium.org2009-09-021-1/+1
| | | | | | | | | | | ftp_network_transaction_unittest.cc TEST=none BUG=none Review URL: http://codereview.chromium.org/176069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25177 0039d316-1c4b-4281-b951-d872f2087c98
* Don't log FTP commands being issued.phajdan.jr@chromium.org2009-09-011-1/+0
| | | | | | | | | TEST=none http://crbug.com/20561 Review URL: http://codereview.chromium.org/173648 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25104 0039d316-1c4b-4281-b951-d872f2087c98
* Move Mozilla FTP LIST response parsing code to net/third_party directory.phajdan.jr@chromium.org2009-09-012-1529/+0
| | | | | | | | | | | This should make licensing terms and third-party origin of the code more clear. TEST=none BUG=none Review URL: http://codereview.chromium.org/179041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25047 0039d316-1c4b-4281-b951-d872f2087c98
* Add histograms for FTP server types encountered by users.phajdan.jr@chromium.org2009-08-282-0/+81
| | | | | | | | | | | This should help with decision which FTP server types we can safely stop supporting. TEST=none BUG=none Review URL: http://codereview.chromium.org/176020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24824 0039d316-1c4b-4281-b951-d872f2087c98
* Don't trust server's PASV response that much in FtpNetworkTransaction.phajdan.jr@chromium.org2009-08-283-38/+116
| | | | | | | | | TEST=Covered by net_unittests. http://crbug.com/20334 Review URL: http://codereview.chromium.org/180011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24818 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-281-5/+5
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-281-5/+5
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* Fix transaction hang when downloading certain FTP files.phajdan.jr@chromium.org2009-08-262-1/+76
| | | | | | | | | TEST=Covered by net_unittests. http://crbug.com/19855 Review URL: http://codereview.chromium.org/174428 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24492 0039d316-1c4b-4281-b951-d872f2087c98
* Implement RestartWithAuth for NewFtpTransaction.phajdan.jr@chromium.org2009-08-264-32/+62
| | | | | | | | | TEST=Covered by net_unittests. http://crbug.com/20112 Review URL: http://codereview.chromium.org/173270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24449 0039d316-1c4b-4281-b951-d872f2087c98
* Followup after http://codereview.chromium.org/165167, fixing the nits in ↵phajdan.jr@chromium.org2009-08-212-9/+9
| | | | | | | | | | | FtpAuthCache. TEST=Covered by net_unittests. BUG=none Review URL: http://codereview.chromium.org/174184 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23961 0039d316-1c4b-4281-b951-d872f2087c98
* LoadLog is used as an output parameter, reorder it to the last parameter.willchan@chromium.org2009-08-144-13/+13
| | | | | | Review URL: http://codereview.chromium.org/164531 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23419 0039d316-1c4b-4281-b951-d872f2087c98
* Add a missing Stop() call to DoDataResolveHostComplete().wtc@chromium.org2009-08-131-4/+6
| | | | | | | | | | | | | | Fix some minor nits. The patch is contributed by Ibrar Ahmed <ibrar.ahmad@gmail.com>. Original review URL: http://codereview.chromium.org/164330 R=wtc BUG=http://crbug.com/4965 TEST=none Review URL: http://codereview.chromium.org/165496 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23389 0039d316-1c4b-4281-b951-d872f2087c98
* Make FtpNetworkTransaction report its load state.phajdan.jr@chromium.org2009-08-122-0/+22
| | | | | | | | | TEST=Covered by net_unittests. http://crbug.com/19095 Review URL: http://codereview.chromium.org/164354 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23201 0039d316-1c4b-4281-b951-d872f2087c98
* Add a "LoadLog" parameter to transactions, hostresolver, clientsocketpool ↵ericroman@google.com2009-08-124-7/+17
| | | | | | | | and proyxservice.This dependency comes from the parent URLRequest, and is used as a container for per-request profiling data.This change is strictly a no-op refactor -- the parameter is unused, and LoadLog does nothing.BUG=http://crbug.com/14478TEST=none -- just needs to compile and pass existing tests.DESIGN=<http://docs.google.com/Doc?id=dfhcnb2v_21gbtrcpr3&hl=en> Review URL: http://codereview.chromium.org/126303 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23127 0039d316-1c4b-4281-b951-d872f2087c98
* Enforce maximum number of entries in FtpAuthCache.phajdan.jr@chromium.org2009-08-113-27/+83
| | | | | | | | | TEST=Covered by net_unittests. BUG=none Review URL: http://codereview.chromium.org/165167 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23094 0039d316-1c4b-4281-b951-d872f2087c98
* Make response code in FtpNetworkTransaction more precise.phajdan.jr@chromium.org2009-08-112-41/+47
| | | | | | | | | | | I consulted RFC 959 while making the changes and checked with real FTP sites. TEST=Covered by net_unittests. http://crbug.com/4965 Review URL: http://codereview.chromium.org/165161 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22977 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in new ftp transaction:phajdan.jr@chromium.org2009-08-072-50/+82
| | | | | | | | | | | | | - don't use C cast, which is forbidden by the C++ style guide - more intuitive error class names - more precise error class descriptions, based on the RFC 959 TEST=none http://crbug.com/4965 Review URL: http://codereview.chromium.org/164162 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22774 0039d316-1c4b-4281-b951-d872f2087c98
* Properly handle invalid server control responses.phajdan.jr@chromium.org2009-08-062-1/+28
| | | | | | | | | | | We should immediately stop the ftp network transaction in such case. TEST=Covered by net_unittests. http://crbug.com/18546 Review URL: http://codereview.chromium.org/164067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22664 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly handle multiple control responses for RETR command.phajdan.jr@chromium.org2009-08-053-21/+52
| | | | | | | | | | | | Re-enable tests which were intermittently failing before this fix and remove debugging code used to track down the issue. TEST=Covered by net_unittests. http://crbug.com/18036 Review URL: http://codereview.chromium.org/160537 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22500 0039d316-1c4b-4281-b951-d872f2087c98
* Followup after http://codereview.chromium.org/149368phajdan.jr@chromium.org2009-08-034-41/+34
| | | | | | | | | | | Fix minor issues in new ftp code. TEST=none BUG=none Review URL: http://codereview.chromium.org/160541 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22347 0039d316-1c4b-4281-b951-d872f2087c98