summaryrefslogtreecommitdiff
path: root/src/FtpNegotiationCommand.cc
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite backup connection handlingTatsuhiro Tsujikawa2013-04-011-51/+1
| | | | | | | Now dedicated ConnectCommand handles connection establishment. It checks whether connection is established or not. It also handles backup connection. The next Command creation is abstracted using ControlChain struct template.
* Implement simple Happy Eyeballs for HTTP/FTP downloadsTatsuhiro Tsujikawa2013-04-011-1/+43
|
* Fix failure to set TCP_NODELAY on WindowsTatsuhiro Tsujikawa2013-02-031-5/+1
| | | | | On Windows setting TCP_NODELAY after non-blocking connect fails at least on Windows 7.
* Disable TCP_NODELAY for BitTorrentTatsuhiro Tsujikawa2013-01-151-0/+4
| | | | To make Request messages more often packed into 1 packet.
* Use 64 bits random bytes as GIDTatsuhiro Tsujikawa2012-12-161-1/+1
| | | | | | | | | | This change replaces the current 64 bit sequential GID with 64 bits random bytes GID in an attempt to support persistent GID. Internally, the GID is stored as uint64_t. For human representation and RPC interface, GID is represented as 16 bytes hex string. For console readout, 16 bytes are too long, so it is abbreviated to first 6 bytes. When querying GID in RPC calls, user can speicfy the prefix of GID as long as the prefix is shared by more than 1 GID entries.
* Made socket non-blocking mode in SocketCore::acceptConnection()Tatsuhiro Tsujikawa2012-11-281-2/+1
|
* Removed trailing spacesTatsuhiro Tsujikawa2012-10-011-4/+4
|
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-2/+2
|
* Use std::string for SocketPoolEntry::options_Tatsuhiro Tsujikawa2012-09-261-3/+3
| | | | | Currently, we only store 1 value for FTP download. std::map is overkill in the this situation.
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-06-251-1/+1
| | | | | Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator and ChecksumValidator are left unchanged.
* Use PRId64 for int64_t format specifierTatsuhiro Tsujikawa2012-06-251-6/+5
|
* aria2 now doesn't assume download's completed just because file size matchedTatsuhiro Tsujikawa2012-01-081-14/+45
| | | | | | | | The only exception is zero-length file. If server tells file is zero-length and --checksum option is given, aria2 now correctly checks its checksum. There is one known issue: If downloaded file is zero-length file and .aria2 file exists, it will not be deleted on successful verification, because .aria2 file is not loaded.
* FTP PASV: fixed IPv6 support.Tatsuhiro Tsujikawa2011-12-101-3/+4
| | | | | If fake FTP URI cannot be parsed (this should not happen), throw exception.
* Check totalLength of file is less than std::numeric_limits<off_t>::max()Tatsuhiro Tsujikawa2011-12-091-3/+2
| | | | | If totalLength is larger than std::numeric_limits<off_t>::max(), throw DownloadFailureException.
* Use int instead of unsigned int where unsigned int is not needed.Tatsuhiro Tsujikawa2011-12-091-14/+14
|
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-2/+2
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* FTP pasv: Use request host when connecting server with http proxy.Tatsuhiro Tsujikawa2011-12-091-1/+1
|
* Use %lld to fomat a2_gid_tTatsuhiro Tsujikawa2011-12-021-1/+1
|
* Support IPv6 address for FTP via HTTP tunneling.Tatsuhiro Tsujikawa2011-11-141-18/+19
| | | | | | | We use control connection address as data connection address, so we don't need to store both address and port. We just store port in PASV/EPSV response and use SocketCore::getPeerInfo() to get peer's address when needed.
* Use fmt instead of util::itosTatsuhiro Tsujikawa2011-11-131-2/+1
|
* Use fmt instead of using snprintf directlyTatsuhiro Tsujikawa2011-11-121-4/+2
|
* Removed strconcatTatsuhiro Tsujikawa2011-11-121-2/+5
|
* Rewritten util::split and added its iterator version.Tatsuhiro Tsujikawa2011-11-041-2/+2
| | | | | Iterator based functions util::startsWith, util::endsWith, util::streq, util::strieq were added.
* util::percentDecode now takes iterators as arguments.Tatsuhiro Tsujikawa2011-11-031-1/+2
|
* Removed utf8ToNative from log message and exception message.Tatsuhiro Tsujikawa2011-08-081-2/+2
|
* In MinGW32, open file with UNICODE filename and print them in ANSI.Tatsuhiro Tsujikawa2011-08-041-4/+5
|
* Use IP address of data connection to connect to the remote server inTatsuhiro Tsujikawa2011-01-201-2/+4
| | | | passive mode.
* Eliminated SocketCore::peekData() form HTTP/FTP downloads.Tatsuhiro Tsujikawa2011-01-161-1/+4
| | | | | | | | | | We introduced SocketRecvBuffer which buffers received bytes. Since HTTP response header and response body are divided with \r\n, we have to buffer up several bytes to find this delimiter. We use SocketRecvBuffer to hold these bytes and only consumes header and passes SocketRecvBuffer, which may contain head of response body, to next Command. Since FTPConnection doesn't use SocketCore::peekData(), we left it as is.
* Removed DownloadContext::dir_. Use PREF_DIR value instead.Tatsuhiro Tsujikawa2010-12-031-1/+1
|
* Added more error code values.Tatsuhiro Tsujikawa2010-12-011-13/+24
| | | | | I have not set error code for all exception invocation. In this change, I set error code where error likely occurs.
* Added additional error_code::Values(9 through 14).Tatsuhiro Tsujikawa2010-11-281-2/+3
|
* Renamed DownloadErrorCode.h as error_code.h. RenamedTatsuhiro Tsujikawa2010-11-281-3/+3
| | | | downloaderrorcode::Value as error_code::Value.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-10/+10
| | | | | | | | Use format specifier %lld for cuid_t. Defined cuid_t as long long int instead of int64_t, since g++ complains int64_t is not suitable for %lld.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-16/+15
| | | | | | Replaced StringFormat with fmt
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-43/+28
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | Replaced HttpHeader::responseStatus_ with HttpHeader::statusCode_. statusCode_ is of type int. * src/AbstractProxyResponseCommand.cc * src/FtpNegotiationCommand.cc * src/HttpHeader.cc * src/HttpHeader.h * src/HttpHeaderProcessor.cc * src/HttpResponse.cc * src/HttpResponse.h * src/HttpResponseCommand.cc * src/HttpSkipResponseCommand.cc * src/util.cc * src/util.h * test/HttpHeaderProcessorTest.cc * test/HttpHeaderTest.cc * test/HttpResponseTest.cc * test/UtilTest.cc
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-3/+0
| | | | | | | | | Added .cc file for classes/structs that only provided by header file. Defined non-POD classes' ctor, dtor in .cc file. Moved implementation code in header file to .cc file for major classes/strucsts.
* 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-121-5/+5
| | | | | | | | Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
* 2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-111-6/+4
| | | | | | | | | | | | | | Create SharedHandle outside of function call to avoid unexpected memory leak. * src/AnnounceList.cc * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/RequestGroup.cc * src/RequestGroupMan.cc * src/UTMetadataPostDownloadHandler.cc * src/download_helper.cc
* 2010-10-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-111-10/+3
| | | | | | | | | | | Use RFC1123 date format in debug log of MDTM response and last-modified time and creation date of .torrent file printed using -S. * src/FtpNegotiationCommand.cc * src/RequestGroup.cc * src/bittorrent_helper.cc
* 2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-021-3/+2
| | | | | | | | | | | | | | | | | | Non-UTF8 filenames are now percent-encoded. For example, filename for http://example.org/%90%A2%8AE will be %90%A2%8AE because it is Shift_JIS. The comments and name in .torrent file in XML-RPC response are percent-encoded if they are not UTF-8. * src/FtpNegotiationCommand.cc * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/XmlRpcMethodImpl.cc * src/bittorrent_helper.cc * src/util.cc * src/util.h * test/BittorrentHelperTest.cc * test/UtilTest.cc
* 2010-09-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-09-151-20/+9
| | | | | | | | | | | | | | | | | | | | | | Fixed the bug that a file gets overwritten if -V is given and no hash is provided. Fixed the bug that --dry-run leads download error. Added RequestGroup::createCheckIntegrityEntry() which correctly creates CheckIntegrityEntry objects and open files based on -V option and the existence of control file. * src/AbstractCommand.cc * src/AbstractCommand.h * src/ChecksumCheckIntegrityEntry.cc * src/DownloadContext.cc * src/DownloadContext.h * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/PieceHashCheckIntegrityEntry.cc * src/RequestGroup.cc * src/RequestGroup.h * src/RequestGroupEntry.cc * src/RequestGroupEntry.h
* 2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-09-131-2/+5
| | | | | | | | | Updated doc * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/RequestGroup.cc
* 2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-09-131-1/+3
| | | | | | | | Fixed the bug that error occurs when downloading zero-length file. * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc
* 2010-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-09-101-13/+11
| | | | | | | | | | | | | | | Check hash(hash for entire file, not piece hash) if --check-integrity option is given and file is downloaded(determined by file length). If it fails, re-download file. * src/AbstractCommand.cc * src/ChecksumCheckIntegrityEntry.cc * src/ChecksumCheckIntegrityEntry.h * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/RequestGroup.cc
* 2010-09-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-09-091-1/+2
| | | | | | | | | | | | | | | | | | | | | Moved connectedHostname, connectedAddr and connectedPort to Request object. Mark cached IP address bad on timeout to allow aria2 to renew IP address cache. * src/AbstractCommand.cc * src/AbstractProxyRequestCommand.cc * src/AbstractProxyRequestCommand.h * src/FtpInitiateConnectionCommand.cc * src/FtpNegotiationCommand.cc * src/FtpNegotiationCommand.h * src/HttpInitiateConnectionCommand.cc * src/HttpRequestCommand.cc * src/HttpRequestCommand.h * src/InitiateConnectionCommand.cc * src/InitiateConnectionCommand.h * src/Request.cc * src/Request.h
* 2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-09-081-1/+6
| | | | | | | | | | Fixed the bug that aria2 reports error and exits with non-zero status when file is already downloaded. * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/RequestGroup.cc
* 2010-07-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-301-13/+114
| | | | | | | | | | | | | | Added FTP EPSV and EPRT command support. aria2 issues these commands when address family of local socket is AF_INET6. * src/FtpConnection.cc * src/FtpConnection.h * src/FtpNegotiationCommand.cc * src/FtpNegotiationCommand.h * src/SocketCore.cc * src/SocketCore.h * test/FtpConnectionTest.cc
* 2010-07-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Pass maxSplitSize as an argument, instead of member variable of DefaultPieceStorage. SegmentMan::getSegment(cuid_t,size_t index) was renamed to SegmentMan::getSegmentWithIndex(...) * src/AbstractCommand.cc * src/AbstractCommand.h * src/DefaultPieceStorage.cc * src/DefaultPieceStorage.h * src/DownloadCommand.cc * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/PieceStorage.h * src/RequestGroup.cc * src/SegmentMan.cc * src/SegmentMan.h * src/UnknownLengthPieceStorage.cc * src/UnknownLengthPieceStorage.h * test/MockPieceStorage.h * test/SegmentManTest.cc
* 2010-07-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Added --max-connection-per-server=NUM option. The default value of NUM is 1. This option limits the number of connections allowed to one server for each download. This means when NUM is 2 and 1 URI is provided, even if you specified -s 5, aria2 establishes 2 connections. Default value of -j option is changed from 5 to 2. * src/BtDependency.cc * src/CreateRequestCommand.cc * src/FileEntry.cc * src/FileEntry.h * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/Metalink2RequestGroup.cc * src/OptionHandlerFactory.cc * src/TrackerWatcherCommand.cc * src/download_helper.cc * src/prefs.cc * src/prefs.h * src/usage_text.h * test/DownloadHelperTest.cc * test/FileEntryTest.cc