Tatsuhiro Tsujikawa
c7c4d46672
Add changeOption and DownloadHandle::getOption API
...
In aria2c.rst, define section label for "Input File" section so that
it can be referenced from other document.
2013-05-16 23:09:19 +09:00
Tatsuhiro Tsujikawa
8e8fb9ee36
Add addTorrent API
2013-05-15 23:29:28 +09:00
Tatsuhiro Tsujikawa
a8ef703b89
Update doc
2013-05-15 22:58:55 +09:00
Tatsuhiro Tsujikawa
a4a4a10490
Remove NULL check for pref because pref is always non NULL
2013-05-15 22:51:35 +09:00
Tatsuhiro Tsujikawa
fc0982587b
Release elements in routineCommands_ on destruction
2013-05-15 22:50:51 +09:00
Tatsuhiro Tsujikawa
cef6db17ba
Add changePosition API
2013-05-15 00:50:55 +09:00
Tatsuhiro Tsujikawa
4f5d26a0c7
Use BtFileMode for TorrentAttribute::mode
2013-05-15 00:09:51 +09:00
Tatsuhiro Tsujikawa
5dcc2b7842
Add DownloadHandle::getBtMetaInfo() API
2013-05-14 23:00:21 +09:00
Tatsuhiro Tsujikawa
b0b5e0df38
Enable multicast loopback in Bt LPD
2013-05-14 21:45:27 +09:00
Tatsuhiro Tsujikawa
e350df2d75
Add download event callback API and its example
2013-05-11 19:40:24 +09:00
Tatsuhiro Tsujikawa
1c571f196a
Refactor Notifier interface to accept DownloadEventListener interface
...
WebSocketSessionMan now implements DownloadEventListener and is added
to Notifier. It becomes member variable of DownloadEngine. The event
constant for download event is defined in aria2.h so that we can add
event callback API later.
2013-05-11 18:50:03 +09:00
Tatsuhiro Tsujikawa
9f4f888e39
Make DownloadHandle::getNumPieces() return int
2013-05-10 21:52:46 +09:00
Tatsuhiro Tsujikawa
1a953d5f93
Add DownloadHandle::getInfohash() and getPieceLength()
2013-05-10 21:51:41 +09:00
Tatsuhiro Tsujikawa
1b6827b060
Revert d50021d045
...
It is safe to use prealloc for default, because of legacy fs (e.g.,
vfat) usage in Android.
2013-05-10 21:14:03 +09:00
Tatsuhiro Tsujikawa
c056f747c6
Install libaria2.pc only when libaria2 is enabled
2013-05-10 21:12:30 +09:00
Tatsuhiro Tsujikawa
233501f768
Enable TLS1.1 with gnutls build
2013-05-10 00:49:06 +09:00
Tatsuhiro Tsujikawa
fb31e44d60
Change error code -1 to just negative error code
2013-05-10 00:08:36 +09:00
Tatsuhiro Tsujikawa
16635f94ea
Make DownloadHandle class
2013-05-10 00:00:36 +09:00
Tatsuhiro Tsujikawa
ca6b46db84
Generate libaria2 API doc from aria2.h
2013-05-09 23:49:30 +09:00
Tatsuhiro Tsujikawa
8940d2aafd
Change the way to receive resulting gids in addUri, addMetalink
2013-05-09 21:28:24 +09:00
Tatsuhiro Tsujikawa
b733431ac4
Add DownloadHandle::getNumFiles and getFile API
2013-05-09 00:48:41 +09:00
Tatsuhiro Tsujikawa
d50021d045
Use trunc as default value for --file-allocation on Android build
2013-05-06 19:31:40 +09:00
Tatsuhiro Tsujikawa
4c139eb039
Add TAG_DEPRECATED in DeprecatedOptionHandler ctor
2013-05-06 19:24:13 +09:00
Tatsuhiro Tsujikawa
512f87f4ff
Fix compiler warning
2013-05-06 19:23:17 +09:00
Tatsuhiro Tsujikawa
5bc5665c6a
Support off64_t for Android build
...
Android NDK R8e does not provide ftruncate64, but bionic has the
assembler code to access kernel function. We borrowed those
ftruncate64.S files from android source code repository. It turns out
that x86 asm.h in NDK R8e is also broken, so latest asm.h was also
borrowed.
2013-05-06 19:12:17 +09:00
Tatsuhiro Tsujikawa
3a4acead2d
Reset global::globalHaltRequested to 0 in MultiUrlRequestInfo::prepare()
2013-05-05 17:47:14 +09:00
Tatsuhiro Tsujikawa
1b920e4011
Add --enable-libaria2 configure option
...
By default, libaria2 feature is disabled. Use --enable-libaria2
to enable it. libaria2 static build is also disabled by default.
Use --enable-static to enable it.
2013-05-05 00:37:11 +09:00
Tatsuhiro Tsujikawa
2bf2dba544
Merge branch 'libaria2'
2013-05-05 00:13:17 +09:00
Tatsuhiro Tsujikawa
22b3e0a4ae
Fix PREF_QUIET is set to A2_V_TRUE even if standalone is true
2013-05-05 00:05:41 +09:00
Tatsuhiro Tsujikawa
ebfc5f55e5
Add SessionConfig to store per Session config
...
sessionConfigSetKeepRunning() was removed and SessionConfig has
keepRunning member instead. Signal handlers are now all prepared in
MultiUrlRequestGroup object. Setting SessionConfig.useSignalHandler to
false will avoid signal handler setup.
2013-05-04 23:56:19 +09:00
Tatsuhiro Tsujikawa
4410f0e56c
Treat response is completed if EOF is received before streamFilter completes
2013-05-04 22:44:08 +09:00
Tatsuhiro Tsujikawa
7d55341fde
Fix event polling not working with no downloads but keepRunning_ is true
2013-05-02 12:44:55 +09:00
Tatsuhiro Tsujikawa
98b132b4d1
Receive reference, not copy
2013-05-02 11:47:29 +09:00
Tatsuhiro Tsujikawa
d07b3ff8d9
Suppress console output for none-standalone mode
2013-05-02 11:30:42 +09:00
Tatsuhiro Tsujikawa
315c05ea3c
Suppress console log output for library use, enclose Platform in try-catch
...
Still need to suppress global::cerr and global::cout
2013-05-02 10:25:28 +09:00
Tatsuhiro Tsujikawa
f5d5d8fa8e
Fix empty unknown option name in OptionParser::parse
2013-05-02 10:19:30 +09:00
Tatsuhiro Tsujikawa
43895155e0
Don't enter daemon mode if standalone is false
2013-05-02 10:08:47 +09:00
Tatsuhiro Tsujikawa
aee621b3d4
Don't exit on error in option_processing
...
Still it exits when -v or -h is given. They are now guarded by
standalone variable and only do so when it is true.
2013-05-02 10:03:00 +09:00
Tatsuhiro Tsujikawa
e5cccd335c
Add addMetalink API function
2013-05-02 09:40:27 +09:00
Tatsuhiro Tsujikawa
24a6896bf4
Add sessionConfigSetKeepRunning and shutdown API function
...
Setting sessionConfigSetKeepRunning to true makes aria2 core keep
running even if there is no download to perform, just like --enable-rpc
option.
2013-05-01 21:28:04 +09:00
Tatsuhiro Tsujikawa
a456d83de0
Update API doc
2013-05-01 17:15:43 +09:00
Tatsuhiro Tsujikawa
bbc8866cfb
Add removeDownload, pauseDownload and unpauseDownload API function
2013-05-01 16:58:34 +09:00
Tatsuhiro Tsujikawa
4c50544f1a
Rename DOWNLOAD_STATUS as DownloadStatus
2013-05-01 13:39:54 +09:00
Tatsuhiro Tsujikawa
2109ba23a8
Add DownloadHandle::getFiles() API function
2013-05-01 13:38:30 +09:00
Tatsuhiro Tsujikawa
5e64d4c9a9
Expose struct DownloadHandle interface to public API directly
2013-05-01 11:58:25 +09:00
Tatsuhiro Tsujikawa
8f659f49ec
Rename gidToString as gidToHex, add hexToGid and isNull
2013-04-30 22:51:05 +09:00
Tatsuhiro Tsujikawa
1df4adefb5
Add accessors for DownloadHandle
...
Added downloadGetBitfield, downloadGetNumPieces,
downloadGetConnections, downloadGetErrorCode,
downloadGetFollowedBy, downloadGetBelongsTo and
downloadGetDir functions.
2013-04-30 22:42:23 +09:00
Tatsuhiro Tsujikawa
d1252dcc5f
Move aria2api.{cc,h} to libaria2_la_SOURCES
2013-04-30 21:47:05 +09:00
Tatsuhiro Tsujikawa
db2e22132d
Merge branch 'libuv-eventpoll' of https://github.com/nmaier/aria2 into nmaier-libuv-eventpoll
2013-04-30 14:53:42 +09:00
Tatsuhiro Tsujikawa
549dd5b2a7
uitos: Fix off-by-one error bug
2013-04-29 23:53:23 +09:00
Nils Maier
a1a3e21f73
LibUV: Revert unrelated change
2013-04-28 21:54:35 +02:00
Nils Maier
e700ebd3e9
LibUV: Reorder event poll preference
...
*nix will keep epoll/kqueue/port as the default (when available), while
Windows, lacking all of these, will default to libuv (when available)
2013-04-28 21:44:06 +02:00
Nils Maier
6b7a51d5e0
Close GZipFiles in the d'tor
2013-04-28 21:32:51 +02:00
Tatsuhiro Tsujikawa
28849e3ddf
Add gidToString and getActiveDownload API functions
2013-04-27 01:26:59 +09:00
Tatsuhiro Tsujikawa
9734fa5447
Call onEndOfRun() on oneshot == true as well
2013-04-27 01:23:54 +09:00
Tatsuhiro Tsujikawa
0ef5f4eea1
Add getDownloadHandle API
2013-04-27 00:57:18 +09:00
Tatsuhiro Tsujikawa
6fcf274f27
Add initialization function and addUri API function for libaria2
2013-04-26 23:59:48 +09:00
Tatsuhiro Tsujikawa
90abec8a36
Move initialization code in aria2::main to struct Context
2013-04-25 21:46:31 +09:00
Tatsuhiro Tsujikawa
bbb978948d
Add preliminary libtool files for libaria2
2013-04-25 11:38:26 +09:00
Tatsuhiro Tsujikawa
b05454657f
Fix cached data is not flushed when downloaded data is less than 16KiB
2013-04-23 23:00:11 +09:00
Tatsuhiro Tsujikawa
9abbd5c917
Use INFO level log when get_associate failed in PortEventPoll::poll()
2013-04-20 21:03:38 +09:00
Nils Maier
539fda0b4f
LibUV: Code cleanup
2013-04-17 15:53:17 +02:00
Nils Maier
1cd5dcc9b6
LibUV: Correct event removal
2013-04-17 15:53:06 +02:00
Tatsuhiro Tsujikawa
8a431bfc89
Don't wait for AAAA query response if A query response has been received
...
If we got IPv4 lookup response, we don't wait for IPv6 lookup
response. This is because DNS server may drop AAAA query and we have
to wait for the long time before timeout. We don't do the inverse,
because, based on todays deployment of DNS server, almost all of them
can respond A query just fine.
2013-04-14 21:12:46 +09:00
Tatsuhiro Tsujikawa
5e245c3397
Fix compile error without SSL/TLS lib
2013-04-14 18:43:16 +09:00
Tatsuhiro Tsujikawa
2e39fd6273
Check configured addresses again if previous check found none of them
...
Currently, aria2 checks configured addresses at the startup. But there
are chances that interfaces are not setup at that moment. For example,
if aria2 is used as daemon, it may start before network interfaces
up. To workaround this, we check addresses again if both addresses are
not configured at the startup.
2013-04-13 21:16:53 +09:00
Tatsuhiro Tsujikawa
4070113ef0
Save options directly specified for download in --save-session
...
This change makes --save-session save only options specified for
download, more specifically, options in command-line, -i file and via
RPC. The other options from conf file and default values are not
saved. This will drastically decrease the size of session file.
2013-04-11 23:13:21 +09:00
Tatsuhiro Tsujikawa
07d38e31ad
Save URI returned only from FileEntry::getRemainingUris()
...
The currently used URIs are inserted back into remaining URI list in
FileEntry::putBackRequest(), which overlaps to some of the URIs in
spentUris_. If we save spent URIs, each time save is performed, the
number of URIs are increased due to this overlap. This change fixes
this bug.
2013-04-11 22:45:37 +09:00
Nils Maier
b874c7df11
AppleMD: Add destructors to make compilers happy
2013-04-10 08:51:57 +02:00
Nils Maier
9acd3df3cb
LibUV: Implement LibuvEventPoll
...
LibUV event will use the best available polling method on a system, kind
of like aria2 does already with the different *EventPoll
implementations.
However, libuv may support different/newer polling mechanisms; for
example on Windows it will use IO Completion Ports which are superior to
select() ;)
2013-04-10 08:47:20 +02:00
Tatsuhiro Tsujikawa
b35fbd3172
Print linked 3rd party libraries with version in `aria2c -v` output
2013-04-10 00:23:39 +09:00
Tatsuhiro Tsujikawa
d0ff31faf8
Format MessageDigest.cc
2013-04-09 23:46:25 +09:00
Tatsuhiro Tsujikawa
f333231c7a
Fix broken MessageDigst::getSupportedHashTypeString()
2013-04-09 23:45:28 +09:00
Tatsuhiro Tsujikawa
15e1a79914
Update TLSSession::checkDirection() doc
...
Make it clear that TLS_WANT_READ must be returned if underlying
SSL/TLS lib does not indicate I/O direction. This is because
SocketCore sets wantRead_ = true when TLS_WANT_READ is returned and
otherwise sets wantWrite_ = true. We only want to set wantWrite_ =
true iff we have some pending data to send.
2013-04-09 01:12:51 +09:00
Tatsuhiro Tsujikawa
83b801a0a5
Merge branch 'appletls-wantread' of https://github.com/nmaier/aria2 into nmaier-appletls-cred-kc
2013-04-09 01:09:16 +09:00
Nils Maier
16876a5334
AppleTLS: Fixup checkDirection() to return WANT_READ by default
2013-04-08 17:09:32 +02:00
Nils Maier
82a861f8d8
AppleTLS: Support credentials via KeyChain fingerprints
2013-04-08 06:45:53 +02:00
Tatsuhiro Tsujikawa
89cf6c0468
Append comment to endif
2013-04-06 16:34:49 +09:00
Tatsuhiro Tsujikawa
457356ad13
Fix make distcheck
2013-04-06 16:33:15 +09:00
Tatsuhiro Tsujikawa
ddad275dbd
Make log level INFO in addTrustedCACertFile()
...
With WARN level, they will be always printed on Mac OS and old GNUTLS
build which does not have its API.
2013-04-06 16:15:32 +09:00
Nils Maier
5709746820
AppleTLS: Block worst ciphers and log session information
2013-04-05 23:31:20 +02:00
Nils Maier
0bcbd947b4
AppleTLS: Implement AppleTLS and Apple Message Digest
2013-04-05 23:10:47 +02:00
Tatsuhiro Tsujikawa
b292ae1305
Use info level log for system trusted ca imports failure
...
This is because on some platforms (gnutls on cygwin for example),
library always fails for this function and getting ERROR every time
aria2c invoked is too hard.
2013-04-05 01:07:43 +09:00
Tatsuhiro Tsujikawa
7ce725098b
Remove default value for deprecated --enable-async-dns6 to suppress warning
2013-04-03 02:27:45 +09:00
Tatsuhiro Tsujikawa
8580c98bce
Abstract TLS session implementation
...
Now TLS session object is abstracted as TLSSession class. Currently,
we have GNUTLS and OpenSSL implementations.
2013-04-03 02:24:41 +09:00
Tatsuhiro Tsujikawa
19b5b7e214
Remove deprecated options: --enable-direct-io and --metalink-servers
2013-04-02 00:12:24 +09:00
Tatsuhiro Tsujikawa
cd1f1fb56d
Deprecate --enable-async-dns6
...
The IPv6 asynchronous name resolver is enabled if the host has at
least one interface with IPv6 address configured (the loopback address
will not be counted), which is roughly the same behaviour of the
standard getaddrinfo(3). To disable IPv6 asynchronous name resolver,
use --disable-ipv6.
2013-04-02 00:02:56 +09:00
Tatsuhiro Tsujikawa
26972b8535
Rewrite backup connection handling
...
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.
2013-04-01 23:51:33 +09:00
Tatsuhiro Tsujikawa
cf23e3e11d
Fix compile error without c-ares
2013-04-01 02:08:53 +09:00
Tatsuhiro Tsujikawa
d575e3cc77
Rewrite async DNS portion without exception
2013-04-01 02:03:22 +09:00
Tatsuhiro Tsujikawa
497c1dd8c9
Use AsyncNameResolverMan in NameResolveCommand
2013-04-01 01:56:51 +09:00
Tatsuhiro Tsujikawa
12a3eaf233
Fix uninitialized UDPTrackerClient::numWatchers_
2013-04-01 01:24:57 +09:00
Tatsuhiro Tsujikawa
b5a6c39262
Use AsyncNameResolverMan in DHTEntryPointNameResolveCommand
2013-04-01 01:24:18 +09:00
Tatsuhiro Tsujikawa
597e1a5c1b
Implement simple Happy Eyeballs for HTTP/FTP downloads
2013-04-01 00:12:27 +09:00
Tatsuhiro Tsujikawa
d671d8bf36
mingw: Ignore tunnel interface and address in 169.254.*
2013-03-31 18:02:46 +09:00
Tatsuhiro Tsujikawa
b9fb15f884
Use GetAdaptersAddresses for Mingw
2013-03-31 18:02:46 +09:00
Tatsuhiro Tsujikawa
f4a0987544
Check non-loopback (and non-linklocak for IPv6) address is configured
...
Issue A record query only when non-loopback IPv4 address is
configured. Likewise, issue AAA record query only when non-loopback
and non-linklocak IPv6 address is configured.
2013-03-31 18:02:45 +09:00
Tatsuhiro Tsujikawa
56fac58b4d
Parallel A and AAAA record lookups with c-ares
2013-03-31 18:02:45 +09:00
Tatsuhiro Tsujikawa
5535ed5f95
Code cleanup
2013-03-18 22:45:07 +09:00
Tatsuhiro Tsujikawa
d88e815033
Fix bug that invalid range error when requesting range starting 0
...
Since the change b782a56b
, we use endOffsetOverride_ as the return
value of getEndByte(). But aria2 does not send Range header field when
range starts 0 (this is because some server returns error if it
received Range: 0-), and the HttpRequest::isRangeSatisfied() checks
the equality of getEndByte() and the end byte in response header and
fails. The fix is send Range header if getEndByte() is set.
2013-03-18 22:01:36 +09:00
Tatsuhiro Tsujikawa
0fa92911d7
util.cc: Include only signal.h for opensolaris build
2013-03-17 15:42:50 +09:00
Tatsuhiro Tsujikawa
0741a14486
Revert 6b55f5d3
because it breaks opensolaris build
2013-03-17 15:42:16 +09:00
Tatsuhiro Tsujikawa
18ad88088d
Fix typo in GZipFile.h spelling
2013-03-16 20:40:39 +09:00
Tatsuhiro Tsujikawa
85de8b0642
Revert DownloadEngine.cc change in 6b55f5d3
because Debian Lenny breaks
2013-03-04 22:32:51 +09:00
Tatsuhiro Tsujikawa
588ee2f1cc
GZipFile: Move buf_, buflen_ to initializer list
2013-03-03 22:55:44 +09:00
Tatsuhiro Tsujikawa
43cb2d880a
Rewrite GZipFile::vprintf()
...
MINGW does not have vasprintf(), so we use _vscprintf() and
vsnprintf(). We want to reuse buffer, so for non-MINGW we use
vsnprintf() with retrying doubling buffer size if output is truncated.
2013-03-03 21:49:42 +09:00
Tatsuhiro Tsujikawa
e17d0f8d4e
Bring back datetime in console log
2013-03-03 18:35:07 +09:00
Tatsuhiro Tsujikawa
66a85777ad
Document UDP tracker in manual
2013-03-03 18:28:25 +09:00
Tatsuhiro Tsujikawa
baaa3a4fb2
Use IndexedList::remove_if to clean up RequestGroupMan::removeStoppedGroup
2013-03-03 18:08:19 +09:00
Tatsuhiro Tsujikawa
d4ba562710
Implement IndexedList::iterator
...
It is dangerous to expose internal iterator to the outside, which is
easily misused.
2013-03-03 18:00:42 +09:00
Tatsuhiro Tsujikawa
421ae13d40
Run checksum check if -V and -c are used and file is completed
...
With -c option, aria2 can continue download after the existing file
position. If it is not completed, then after completion aria2 runs
checksum checking if available. But if existing file has already been
completed, then CreateRequestCommand exits without issuing checksum
checking. And aria2 treats it download error because it needs checksum
verification but it has not been done. This change fixes this by
properly checking download state and issue checksum checking before
CreateRequestCommand.
2013-03-03 17:18:12 +09:00
Tatsuhiro Tsujikawa
9b99875478
Add writeOptionLine() to format 1 line of option name/value pair
2013-03-03 14:12:59 +09:00
Tatsuhiro Tsujikawa
6b55f5d393
Do changes in 8aa1db6
in other places which include signal.h
2013-03-03 13:41:03 +09:00
Tatsuhiro Tsujikawa
7c66d1952a
Merge branch 'mingw-signal' of https://github.com/nmaier/aria2 into nmaier-mingw-signal
2013-03-03 13:28:51 +09:00
Tatsuhiro Tsujikawa
122e5929c1
SessionSerializer: Remove check fp because it is always true
2013-03-03 13:20:54 +09:00
Tatsuhiro Tsujikawa
f4469b79aa
SessionSerializer crash when filename length is less than 3
2013-03-03 13:19:52 +09:00
Tatsuhiro Tsujikawa
910e40f128
Fix missing value in serialized pause option
2013-03-03 13:17:49 +09:00
Nils Maier
f2f8b14047
Support for gzipped -i and --save-session
...
Saved sessions may very large, as in hundreds and even thousands of
megabyte when dealing with large queues.
Add support to save and reload sessions to gzipped files, when libz is
available.
The session serializer will output gzipped contents when the file ends
with .gz, while the input file reader (UriListParser) will accept
whatever is thrown at it.
2013-03-02 15:48:26 +01:00
Nils Maier
b0556a7519
Do not use a virtual varargs function
...
This stuff breaks in some compiler (configurations)
2013-03-02 15:48:26 +01:00
Nils Maier
8aa1db682b
Check for sys/signal.h and/or signal.h
...
mingw-w64 does not actually have sys/signal.h, while OSX currently has a
broken signal.h
Better check the presence of both and use sys/signal.h if present, else
signal.h
2013-03-02 15:09:54 +01:00
Nils Maier
7f6a446750
Hygiene: Fix some clang warnings, mostly unused private members.
2013-03-01 13:17:52 +01:00
Nils Maier
62f842579d
Fix bustage on OSX with ./configure CC=cc CXX=c++ (clang)
2013-03-01 12:43:40 +01:00
Tatsuhiro Tsujikawa
e4bd910d43
Update doc
2013-02-26 23:43:52 +09:00
Tatsuhiro Tsujikawa
704eebfac6
Use std::remove_if
2013-02-26 23:43:20 +09:00
Tatsuhiro Tsujikawa
7f805df4f0
Use std::remove_if
2013-02-26 22:59:28 +09:00
Tatsuhiro Tsujikawa
4ac4fdf1e9
Use same port number for IPv4 and IPv6 DHT
2013-02-26 22:44:19 +09:00
Tatsuhiro Tsujikawa
33037982dc
Improve log message for server socket
2013-02-26 22:44:15 +09:00
Tatsuhiro Tsujikawa
dfac717dbf
Merge branch 'fix-initial-rq-leak' of https://github.com/nmaier/aria2 into nmaier-fix-initial-rq-leak
2013-02-26 21:56:37 +09:00
Nils Maier
d1301b8697
Do not reference RequestGroups longer than necessary
...
There is an initial vector of SharedHandle<RequestGroup> to seed the
DownloadEngine. This vector was however kept alive via main.cc ->
MultiUrlRequestInfo up until the program exits, hence effetively leaking
all initial RequestGroups and associated object instances.
Hence, as a matter of dirty-workaround, drop the contents of that initial
vector as soon as it is not required any longer.
2013-02-26 10:49:24 +01:00
Nils Maier
11b9f3ebe2
Detect console with on Windows
...
Signed-off-by: Nils Maier <maierman@web.de>
2013-02-25 20:47:43 +01:00
Tatsuhiro Tsujikawa
a49397ed19
Fix infinite loop when size of downloadResults_ exceeds maxDownloadResult_
2013-02-25 21:42:54 +09:00
Tatsuhiro Tsujikawa
2aeb7137d0
Log host and port when unexpected or unknown UDP tracker reply is received
2013-02-25 01:14:27 +09:00
Tatsuhiro Tsujikawa
d68741697a
Support UDP tracker
...
It shares UDP listening port with IPv4 DHT. At the moment, in order to
enable UDP tracker support, enable IPv4 DHT.
2013-02-25 00:56:49 +09:00
Tatsuhiro Tsujikawa
b782a56b1c
Show correct end byte in error message when HTTP response range is not ok
...
Previously, unless HTTP pipelining is enabled, end byte in that
message is always 0. With this change, it shows correct end byte sent
to the HTTP server.
2013-02-23 15:37:35 +09:00
Tatsuhiro Tsujikawa
73f4db883c
Update copyright year in version text
2013-02-21 01:39:08 +09:00
Tatsuhiro Tsujikawa
b3acf4d393
Rewrite cookie_helper::reverseDomainLevel()
2013-02-16 22:51:58 +09:00
Tatsuhiro Tsujikawa
61665d2c26
Set sa_mask when setting signal handler
2013-02-14 21:51:30 +09:00
Tatsuhiro Tsujikawa
8e3ae3b76c
Use _exit() instead of exit() where appropriate
2013-02-14 01:01:06 +09:00
Tatsuhiro Tsujikawa
3fc45edaa7
Fix bug that active downloads are not saved with --save-session-interval
2013-02-04 21:50:09 +09:00
Tatsuhiro Tsujikawa
98e7018599
Fix failure to set TCP_NODELAY on Windows
...
On Windows setting TCP_NODELAY after non-blocking connect fails
at least on Windows 7.
2013-02-03 19:09:06 +09:00
Tatsuhiro Tsujikawa
1c9cfccac4
Fix invalid iterator handling when deleting RequestGroup
2013-02-03 18:18:28 +09:00
Tatsuhiro Tsujikawa
85cd65a664
Add debug log for aligned cache write
2013-02-02 21:28:52 +09:00
Tatsuhiro Tsujikawa
561f0b3e29
Use std::deque instead of std::list in IndexedList
...
We choose faster iteration over rare slower deletion in the middle.
2013-02-01 00:03:47 +09:00
Tatsuhiro Tsujikawa
de9697fc47
Fix compiler warning
2013-01-29 21:38:58 +09:00
Tatsuhiro Tsujikawa
e583717144
Increase MAX_PEER_LIST_SIZE to 512
...
We definitely need some tests to determine this value.
2013-01-28 21:36:52 +09:00
Tatsuhiro Tsujikawa
988878930e
Check SSL_OP_NO_COMPRESSION is available before using it
2013-01-27 17:32:06 +09:00
Tatsuhiro Tsujikawa
a722500d62
Make DefaultPeerStorage::droppedPeers_ distinct
2013-01-26 19:00:03 +09:00
Tatsuhiro Tsujikawa
3a19b65dd7
Rename /BadCondition/ in Peer to /Drop/
2013-01-26 18:50:48 +09:00
Tatsuhiro Tsujikawa
91b26ab2a8
DefaultPeerStorage::addBadPeer: Updating eoi is not required after erasure
2013-01-26 18:41:43 +09:00
Tatsuhiro Tsujikawa
1e4f301ec1
Remove PeerStorage::getActivePeers() and add getUsedPeers() instead
...
PeerStorage::getUsedPeers() returns non-active peers, so caller must
call Peer::isActive() to get active peers.
2013-01-26 18:36:09 +09:00
Tatsuhiro Tsujikawa
ba69f5c0c3
Refactor peer list management in DefaultPeerStorage
...
Peer list is now divided into 2: unusedPeers_ and usedPeers_.
Duplicate check is done using std::set by comparing pair of IP address
and port. For this, only IP address and port given to the Peer
constructor are used. In other words, TCP port received from extended
message is not used for this purpose.
2013-01-26 17:50:06 +09:00
Tatsuhiro Tsujikawa
8524ac3806
Code cleanup
2013-01-25 00:10:11 +09:00
Tatsuhiro Tsujikawa
de394bbf61
DefaultPeerStorage::addPeer: Remove unnecessary '='
2013-01-25 00:08:49 +09:00
Tatsuhiro Tsujikawa
550ac8c074
Fix bug returnPeer is not called if sequence_ == INITIATOR_SEND_KEY
...
In InitiatorMSEHandshakeCommand, when aborting connection, we must
return peer to the PeerStorage. But it is not done if sequence_ is
INITIATOR_SEND_KEY. This causes stale Peer objects whose usedBy()
returns true eventually occupies peer list and aria2 cannot make any
connections.
2013-01-25 00:01:43 +09:00
Tatsuhiro Tsujikawa
32a3c441af
Fix bug: wrong parenthesis position in the condition
2013-01-24 00:04:58 +09:00
Tatsuhiro Tsujikawa
3b7566faf1
Rewritten util::uitos()
2013-01-16 23:30:02 +09:00
Tatsuhiro Tsujikawa
1c72b80aa5
Revert 53dde0a9
...
Reverted to the original strategy, but some values are tweaked.
Without TCP_NODELAY, 53dde0a9
does not work well.
2013-01-15 23:50:12 +09:00
Tatsuhiro Tsujikawa
bf4ea63a66
Disable TCP_NODELAY for BitTorrent
...
To make Request messages more often packed into 1 packet.
2013-01-15 23:17:21 +09:00
Tatsuhiro Tsujikawa
e6b0274685
Remove reqNumToCreate constraint when creating request
...
It really degrades download speed.
2013-01-15 23:07:08 +09:00
Tatsuhiro Tsujikawa
df0be5e7f0
Cosmetic change
2013-01-15 21:57:35 +09:00
Tatsuhiro Tsujikawa
88580da587
Remove Append and StringAppend
2013-01-15 21:46:03 +09:00
Tatsuhiro Tsujikawa
6a976a4118
Accept k and m as well as K and M in util::getRealSize()
2013-01-15 21:36:25 +09:00
Tatsuhiro Tsujikawa
851eb137c1
Reverted UB_MAX_OUTSTANDING_REQUEST to 256
2013-01-15 00:33:40 +09:00
Tatsuhiro Tsujikawa
53dde0a9ae
Download rate based strategy to increase outstanding request
...
This strategy performs better than old one in high latency
environment.
2013-01-15 00:02:40 +09:00
Tatsuhiro Tsujikawa
d05ef28104
Avoid tiny packet for Have and Request message
2013-01-14 21:02:58 +09:00
Tatsuhiro Tsujikawa
d8f5887bbe
Increase amount to 24K to pack Piece header and payload; fix missing goto
2013-01-14 21:01:08 +09:00
Tatsuhiro Tsujikawa
63b6075c91
Pack Piece message header and body into one chunk
2013-01-14 18:09:40 +09:00
Tatsuhiro Tsujikawa
36fcccbbdf
Reverted accidental change to CHOKE_ROUND_INTERVAL
2013-01-11 23:30:26 +09:00
Tatsuhiro Tsujikawa
1ad815061b
Rewritten SpeedCalc
2013-01-11 23:29:58 +09:00
Tatsuhiro Tsujikawa
c893d82867
Removed BtMessage::isSendingProgress()
...
DefaultBtMessageDispatcher::isSendingInProgress() now checks the
number of buffer entry in PeerConnection.
2013-01-11 20:26:31 +09:00
Tatsuhiro Tsujikawa
c04df672d1
Buffer up at most A2_IOV_MAX buffer entries for BtMessages
2013-01-11 18:46:36 +09:00
Tatsuhiro Tsujikawa
e0ea88ebcf
mingw32: Make NTFS sparse file on --file-allocation=trunc
2013-01-11 18:35:54 +09:00
Tatsuhiro Tsujikawa
357e4b1a77
Made SocketCore::readData() and readDataFrom() take void*
2013-01-11 17:03:59 +09:00
Tatsuhiro Tsujikawa
8ba0d58ee1
Vectorized write for SocketBuffer to avoid small packet
2013-01-11 16:50:04 +09:00
Tatsuhiro Tsujikawa
8e63bad2da
Added --save-session-interval option
...
--save-session-interval option saves error/unfinished downloads to a
file specified by --save-session option every SEC seconds. If 0 is
given, file will be saved only when aria2 exits.
2013-01-10 00:15:30 +09:00
Tatsuhiro Tsujikawa
87af7c32c6
Use request URI as referer if --referer="*" is given
2013-01-08 21:42:42 +09:00
Tatsuhiro Tsujikawa
08bed3f77f
Log warn if unknown option is found in config file or -i file
2013-01-07 22:42:28 +09:00
Tatsuhiro Tsujikawa
d6000024c0
Added --console-log-level option
...
--console-log-level option sets log level to output to console.
2013-01-05 18:48:09 +09:00
Tatsuhiro Tsujikawa
f019eae5df
mingw32: Use LANG_ENGLISH for error message
2012-12-27 00:53:22 +09:00
Tatsuhiro Tsujikawa
247084f9c3
Fixed bug that USR_BASENAME is not defined
...
In some cases, if the dirname is only "/", the basename will not be
defined (e.g., "/f"). This change fixes this bug.
2012-12-27 00:03:37 +09:00
Tatsuhiro Tsujikawa
bd671403bc
Fix compiler warning
2012-12-26 23:10:32 +09:00
Tatsuhiro Tsujikawa
c09a5a95f4
mingw32: Re-open files with read-only mode enabled on seeding
...
On Mingw32 build, if aria2 opens file with GENERIC_WRITE access right,
some programs cannot open the file aria2 is seeding. To avoid this
situation, re-open files with read-only enabled when seeding is about
to begin.
2012-12-24 23:03:19 +09:00
Tatsuhiro Tsujikawa
d13aa3a0b3
Added missing IndexedList.h to SRCS
2012-12-24 21:23:52 +09:00
Tatsuhiro Tsujikawa
616cd9e75f
Simplified RequestGroupMan::fillRequestGroupFromReserver
2012-12-22 23:37:44 +09:00
Tatsuhiro Tsujikawa
b017e80438
Changed threshold of using upper unit for abbrevSize
2012-12-19 23:58:24 +09:00
Tatsuhiro Tsujikawa
07bb779eb0
Faster deletion of RequestGroup and DownloadResult lists
2012-12-19 23:03:48 +09:00
Tatsuhiro Tsujikawa
c8565360b0
Removed unused variables
2012-12-17 00:43:13 +09:00
Tatsuhiro Tsujikawa
77a4ee4de0
Save gid option with --save-session option
2012-12-17 00:33:11 +09:00
Tatsuhiro Tsujikawa
0a4ce4fdb5
Use map to make DownloadResult lookup fast
2012-12-16 18:50:45 +09:00
Tatsuhiro Tsujikawa
0001f4cfbd
Added --gid option
...
This option sets GID manually. aria2 identifies each download by the
ID called GID. The GID must be hex string of 16 characters, thus
[0-9a-zA-Z] are allowed and leading zeros must not be stripped. The
GID all 0 is reserved and must not be used. The GID must be unique,
otherwise error is reported and the download is not added. This
option is useful when restoring the sessions saved using
--save-session option. If this option is not used, new GID is
generated by aria2.
2012-12-16 18:22:13 +09:00
Tatsuhiro Tsujikawa
b9da9d4ed3
Use 64 bits random bytes as GID
...
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.
2012-12-16 17:29:01 +09:00
Tatsuhiro Tsujikawa
04586f50b1
Fixed BitfieldMan::getOffsetCompletedLength overflow on 32-bit systems
2012-12-16 17:26:01 +09:00
Tatsuhiro Tsujikawa
de1ca6d6b8
mingw32: Use HANDLE only for MinGW32 build
2012-12-15 18:28:46 +09:00
Tatsuhiro Tsujikawa
2235743de3
Changed console readout, making it more compact
...
"SIZE:" is removed because it is obvious. SEEDING, SEED, SPD and UP
are now replaced with SEED, SD, DL and UL respectively.
2012-12-12 23:22:04 +09:00
Tatsuhiro Tsujikawa
4fdd5da27d
Compact readout when more than 1 simultaneous downloads are going on
...
If more than 1 simultaneous downloads are going on, use more compact
format in readout. Currently, at most 5 download stats are displayed.
util::abbrevSize() is rewritten to support "Gi" unit and provides more
compact abbreviation.
2012-12-11 23:40:06 +09:00
Tatsuhiro Tsujikawa
79fce29bda
Fixed segmentation fault if fp_ is NULL
2012-12-11 23:39:12 +09:00
Tatsuhiro Tsujikawa
e86fd44dc5
Console color output
...
Log level and download result string is now colored.
2012-12-08 21:48:18 +09:00
Tatsuhiro Tsujikawa
9a5fff0de0
Logger: Simplified console output and change level format in log
...
The date and time are now removed from console output. The log level
is now formatted as "[LEVEL]".
2012-12-08 19:13:59 +09:00
Tatsuhiro Tsujikawa
2364f809c3
Code cleanup: Merged successive string literals in readout
2012-12-08 19:09:03 +09:00
Tatsuhiro Tsujikawa
bf56f3c299
Check the output file is terminal or not in ctor
2012-12-08 18:38:30 +09:00
Tatsuhiro Tsujikawa
9d7bb9d01a
Release statically allocated resources for prefs and options
...
Not realeasing these resources does not hurt the correctness of the
program, but memory leak detection tool, such as valgrind, reports it
as potential memory leak. It is better to distinguish it from the real
ones.
2012-12-08 17:52:10 +09:00
Tatsuhiro Tsujikawa
901227db9b
Updated usage of --disk-cache
2012-12-07 00:44:42 +09:00
Tatsuhiro Tsujikawa
7a02177698
Start to find faster host before the number of missing segments becomes 1
...
The old implementation starts to find faster host when the number of
missing segment becomes 1. Because of --min-split-size option, before
the number of missing segment becomes 1, the number of connection
becomes 1 and it can be slow. In this case, we have to wait until the
last segment is reached. The new implementation starts to find faster
host when the remaining length is less than --min-split-size * 2, to
mitigate the problem stated above.
2012-12-07 00:32:44 +09:00
Tatsuhiro Tsujikawa
5683f2fb3e
Removed unused staticSHA1Digest
2012-12-07 00:12:22 +09:00
Tatsuhiro Tsujikawa
bec0f6dc11
Removed warning when --file-allocation=falloc is used in MinGW32 build
...
The warning was just a mistake. SetFilePointerEx + SetEndOfFile
actually allocate disk space.
2012-12-06 22:48:46 +09:00
Tatsuhiro Tsujikawa
a6b18c868b
Log size before flush
2012-12-06 03:04:41 +09:00
Tatsuhiro Tsujikawa
df5f1fe77f
Fixed bug that size_ is not updated when WrDiskCacheEntry::append is called
2012-12-06 03:04:05 +09:00
Tatsuhiro Tsujikawa
838949ab85
Append new data to the contagious cache data
...
If we receive small data (e.g., 1 or 2 bytes), cache entry becomes a
headache. To mitigate this problem, we allocate cache buffer at least
4KiB and append the data to the contagious cache data.
2012-12-06 02:23:32 +09:00
Tatsuhiro Tsujikawa
2c5e77f422
Flush cached data on checkout/cancel Segment
...
This change prevents the cached data from overlap because of BT peers.
2012-12-06 01:16:28 +09:00
Tatsuhiro Tsujikawa
56c498bcbf
Clear write cache on Segment::clear and Piece::clearAllBlock
2012-12-06 00:39:14 +09:00
Tatsuhiro Tsujikawa
9ed8502e74
Write data in 4K aligned offset in write with disk cache enabled
...
This greatly reduces disk activity especially on Win + NTFS. Not so
much difference on Linux.
2012-12-06 00:17:11 +09:00
Tatsuhiro Tsujikawa
911851debb
mingw32: Removed FSCTL_SET_SPARSE set
2012-12-03 23:07:05 +09:00
Tatsuhiro Tsujikawa
f314719618
Added --disk-cache option
...
This option enables disk cache. If SIZE is 0, the disk cache is
disabled. This feature caches the downloaded data in memory, which
grows to at most SIZE bytes. The cache storage is created for aria2
instance and shared by all downloads. The one advantage of the disk
cache is reduce the disk seek time because the data is written in
larger unit and it is reordered by the offset of the file. If the
underlying file is heavily fragmented it is not the case.
2012-12-03 01:39:10 +09:00
Tatsuhiro Tsujikawa
8ac433a8e9
Fixed compile error without SSL/TLS lib
2012-12-01 23:37:57 +09:00
Tatsuhiro Tsujikawa
2cbdd8b845
Fixed compile error without BitTorrent support
2012-12-01 21:33:25 +09:00
Tatsuhiro Tsujikawa
7e59e2dbb5
mingw32: Open file using _wsopen and added --enable-mmap support
...
I tried CreateFile but the subsequent ReadFile fails with Access
Denied if sparse file is read on NTFS. I mostly reverted previous
changes and use _wsopen with read/write share enabled instead of
CreateFile.
This change also includes --enable-mmap support for MinGW32
build. Memory mapped file may be useful for 64-bits OS and lots of
RAM. Currently, FlushViewOfFile is not called during the download, so
it is slightly vulnerable against sudden power loss. I found lots of
read when resuming download due to page fault. So for now it is useful
for the initial download. I recommend not to use
--file-allocation=prealloc with --enable-mmap for MinGW32, because it
triggers page faults even in the initial download. Anyway, the option
is experimental.
2012-12-01 19:38:30 +09:00
Tatsuhiro Tsujikawa
b95f15b462
Use Win32 API for file I/O in AbstractDiskWriter
...
Now file has been opened by aria2 is now readable by other processes.
2012-11-30 01:20:49 +09:00
Tatsuhiro Tsujikawa
74520b03f8
Set F_GLOBAL_NOCACHE for Mac OS X
2012-11-28 21:47:55 +09:00
Tatsuhiro Tsujikawa
506a9358e1
Refactored file open code
2012-11-28 21:46:44 +09:00
Tatsuhiro Tsujikawa
16e25ef4e1
Enabled TCP_NODELAY in SocketCore::establishConnection and acceptConnection
2012-11-28 00:20:43 +09:00
Tatsuhiro Tsujikawa
e781e6eac1
Made socket non-blocking mode in SocketCore::beginListen()
2012-11-28 00:15:03 +09:00
Tatsuhiro Tsujikawa
438f95abae
Made socket non-blocking mode in SocketCore::acceptConnection()
2012-11-28 00:10:32 +09:00
Tatsuhiro Tsujikawa
e0dcb942b2
Added --force-save option.
...
--force-save option saves download with --save-session option even if
the download is completed or removed. This may be useful to save
BitTorrent seeding which is recognized as completed state. The
default value is false.
2012-11-17 15:33:44 +09:00
Tatsuhiro Tsujikawa
2ee4361848
Removed unused static function util::parseParam
2012-11-17 14:38:55 +09:00
Tatsuhiro Tsujikawa
9c1fe4addd
Use array_ptr to remove try block
2012-11-15 22:05:59 +09:00
Tatsuhiro Tsujikawa
6b2f5ab1f5
SocketCore::bind now accepts const char* host instead of std::string
2012-11-15 21:09:10 +09:00
Tatsuhiro Tsujikawa
b2893f1e31
Get the correct uploaded data size
...
Subtract msgHdrLen_ from writtenLength to get the uploaded data size.
Without this correction, the seeder assumes it has uploaded more data
than it actually has.
2012-11-04 16:49:39 +09:00
Tatsuhiro Tsujikawa
31189b1222
Made return type of util::parse_content_disposition ssize_t
2012-11-01 22:54:32 +09:00
Tatsuhiro Tsujikawa
08cd68ec95
Removed Socket.h from SRCS
2012-10-31 19:07:08 +09:00
Tatsuhiro Tsujikawa
bf342a2827
Fixed compile error with mingw
2012-10-31 17:10:49 +09:00
Tatsuhiro Tsujikawa
d4e7b51eb9
Made --http-no-cache false by default
2012-10-31 16:44:28 +09:00
Tatsuhiro Tsujikawa
49e9f66c16
Use len formal parameter of util::parse_content_disposition
2012-10-31 01:24:10 +09:00
Tatsuhiro Tsujikawa
5dfd1a5af7
Fixed memory leak
2012-10-29 23:43:35 +09:00
Tatsuhiro Tsujikawa
00e3151110
Initialized member
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
f60b956a48
Removed always-true condition
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
2676bbe9c6
Initialized scalar members
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
feb548e174
Removed unused members
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
6fddbc845c
Removed dead code
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
f42199b46d
Fixed resource leak
2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa
8566d050ff
Reset stream format state
2012-10-29 22:39:09 +09:00
Tatsuhiro Tsujikawa
d6f73292fa
gnutls: Added more status checking when verifying peer
2012-10-27 17:46:53 +09:00
Tatsuhiro Tsujikawa
118aed9c24
Content-Disposition parser conforming to RFC 6266.
...
RFC 2231 Continuation is not supported.
2012-10-27 14:51:07 +09:00
Tatsuhiro Tsujikawa
21c3903af0
Simplified TransferStat struct
2012-10-26 00:16:20 +09:00
Tatsuhiro Tsujikawa
0ecfa19925
Reworked download/upload statistics calculation
...
The old implementation calculates download/upload statistics for a
RequestGroup by summing up all PeerStat objects. For global
statistics, those are summed together. This clearly incurs runtime
penalty and we introduced some kind of caching which updates
statistics every 250ms but it did not work right.
This change removes all these aggregation code, and instead makes
RequestGroup and RequestGroupMan objects hold NetStat object and
download/upload bytes are directly calculated by thier own NetStat.
This is far more simplar than the old way and less runtime penalty and
brings more accuracy.
2012-10-25 23:33:45 +09:00
Tatsuhiro Tsujikawa
46bdaf0e8d
Made HTTP/FTP download speed limiter more accurate
...
We have to do the same thing for BitTorrent.
2012-10-24 01:05:41 +09:00
Tatsuhiro Tsujikawa
da8086cbc9
Updated doc
2012-10-16 22:55:14 +09:00
Tatsuhiro Tsujikawa
a9c76ed35e
Added --rpc-save-upload-metadata option
...
If true is given, which is default, save the uploaded torrent or
metalink metadata in the directory specified by --dir option. The
filename consists of SHA1-hash hex string of metadata plus
extension. For torrent, the extension is '.torrent'. For metalink, it
is '.meta4'. If false is given to this option, the downloads added by
aria2.addTorrent or aria2.addMetalink will not be saved by
--save-session option.
2012-10-16 00:18:34 +09:00
Tatsuhiro Tsujikawa
4a4fec2c8c
Removed socket readability check from checkIfConnectionEstablished()
2012-10-15 23:27:51 +09:00
Tatsuhiro Tsujikawa
841395f332
Perform SSL/TLS handshake after checking whether connection is established
2012-10-15 23:26:51 +09:00
Tatsuhiro Tsujikawa
c904aa50fe
Use uri_split instead of uri::parse where appropriate
2012-10-14 18:05:34 +09:00
Tatsuhiro Tsujikawa
692f978978
Rewritten URI parser
2012-10-14 00:14:50 +09:00
Tatsuhiro Tsujikawa
5367c34de3
Fixed bug that mmap won't work if MultiDiskAdaptor is used
2012-10-08 19:13:01 +09:00
Tatsuhiro Tsujikawa
71620854c7
Moved bool members to the last to reduce structure size
2012-10-07 22:14:06 +09:00
Tatsuhiro Tsujikawa
8b0c701266
Removed trailing spaces
2012-10-01 23:52:22 +09:00
Tatsuhiro Tsujikawa
7c878d3c81
Moved implementation of SharedCount and WeakCount to cc file
2012-09-30 18:14:59 +09:00
Tatsuhiro Tsujikawa
e34d0e7ffa
Dont' return SharedHandle from HttpHeader::getRange()
2012-09-30 17:30:35 +09:00
Tatsuhiro Tsujikawa
90515dfa50
RPC over SSL/TLS transport
...
To enable RPC over SSL/TLS, specify server certificate and private key
using --rpc-certificate and --rpc-private-key options and enable
--rpc-secure option. After the encryption is enabled, use https and
wss scheme to access RPC server.
2012-09-30 00:50:14 +09:00
Tatsuhiro Tsujikawa
4b94ede268
Return ExtensionMessage subclass create return raw pointer
2012-09-28 23:40:44 +09:00
Tatsuhiro Tsujikawa
3258614033
Removed *Handle typedef
2012-09-28 23:27:46 +09:00
Tatsuhiro Tsujikawa
1c57a3ff9f
Code cleanup
2012-09-28 22:00:46 +09:00
Tatsuhiro Tsujikawa
1fdc6e0a33
Code cleanup
2012-09-28 00:26:34 +09:00
Tatsuhiro Tsujikawa
c6b76f1d32
Don't instantiate SharedHandle for DHT{Query, Response}Message subclass
2012-09-28 00:13:08 +09:00
Tatsuhiro Tsujikawa
5323afa5b2
Removed instantiation of unused BtMessageValidator
2012-09-27 23:46:34 +09:00
Tatsuhiro Tsujikawa
215d1d3d0b
Made static create function of BtMessage subclass return raw pointer
2012-09-27 23:40:25 +09:00
Tatsuhiro Tsujikawa
ae2e4cb7ff
Handle OptionHandlers as raw pointer
2012-09-27 22:45:31 +09:00
Tatsuhiro Tsujikawa
8fc5cdea02
Removed unused functions
2012-09-27 01:03:39 +09:00
Tatsuhiro Tsujikawa
89f18dde85
Use nothrow version of parseInt, parseUInt and parseLLInt
2012-09-27 00:45:32 +09:00
Tatsuhiro Tsujikawa
a879d75aaa
Don't use parseInt in cookie_helper
2012-09-27 00:16:22 +09:00
Tatsuhiro Tsujikawa
f75402739b
Rewritten ServerStatMan::load() using nothrow version of parseInt
2012-09-27 00:07:15 +09:00
Tatsuhiro Tsujikawa
8f2030da09
Removed HttpHeader::findAs{LL}Int and unused HttpResponse::{has,get}RetryAfter
2012-09-26 23:58:59 +09:00
Tatsuhiro Tsujikawa
b9f972665b
Rewritten LpdMessageReceiver::receiveMessage()
2012-09-26 23:45:58 +09:00
Tatsuhiro Tsujikawa
3a917ff695
Rewritten FtpConnection::receiveMdtmResponse without util::parseInt
2012-09-26 23:14:49 +09:00
Tatsuhiro Tsujikawa
10a68061f7
Code cleanup
2012-09-26 23:03:25 +09:00
Tatsuhiro Tsujikawa
a20e279606
Use std::string for SocketPoolEntry::options_
...
Currently, we only store 1 value for FTP download. std::map is
overkill in the this situation.
2012-09-26 23:00:05 +09:00
Tatsuhiro Tsujikawa
c13dc166de
Rewritten ExtensionMessageRegistry
2012-09-26 22:02:48 +09:00
Tatsuhiro Tsujikawa
f0000a8754
Made ExtensionMessage's NAME const char[]
2012-09-26 00:01:41 +09:00
Tatsuhiro Tsujikawa
c522d79d89
Code cleanup
2012-09-25 23:48:35 +09:00
Tatsuhiro Tsujikawa
f133091a9e
Made BufferedFile ctor take const char* args
2012-09-25 23:44:41 +09:00
Tatsuhiro Tsujikawa
c63af24c63
Made BtMessage's NAME const char[]
2012-09-25 23:28:24 +09:00
Tatsuhiro Tsujikawa
9a510ddac0
Made MetalinkMetaurl::MEDIATYPE_TORRENT const char[]
2012-09-25 23:07:23 +09:00
Tatsuhiro Tsujikawa
8788cae7e3
Removed MetalinkResource static strings
2012-09-25 23:03:19 +09:00
Tatsuhiro Tsujikawa
be77d1394e
Removed Request::PROTO_*
2012-09-25 22:41:03 +09:00
Tatsuhiro Tsujikawa
c186e93488
Code cleanup
2012-09-25 22:02:58 +09:00
Tatsuhiro Tsujikawa
c16cebbc9a
Code cleanup
2012-09-25 22:00:56 +09:00
Tatsuhiro Tsujikawa
41cb774374
Made getMethodName() of RpcMethod subclass return const char*
2012-09-25 21:57:08 +09:00
Tatsuhiro Tsujikawa
260a0b8bcb
Rewritten AnnounceList::getEventString()
2012-09-25 00:07:14 +09:00
Tatsuhiro Tsujikawa
b640b830a2
Made STATUS_STRING const char*[]
2012-09-25 00:01:00 +09:00
Tatsuhiro Tsujikawa
a8c0794640
Made DEFAULT_STRIP_CHARSET const char[]
2012-09-24 23:54:41 +09:00
Tatsuhiro Tsujikawa
656a766bb0
Rewritten ServerStatMan::load()
2012-09-24 23:35:41 +09:00
Tatsuhiro Tsujikawa
d8c44fe9e8
Use const char* instead of static const std::string
2012-09-24 23:20:43 +09:00
Tatsuhiro Tsujikawa
0144397e4b
Rewritten File::getPathSeparators()
2012-09-24 23:04:42 +09:00
Tatsuhiro Tsujikawa
d95a179876
Removed A2STR strings other than NIL
2012-09-24 23:01:08 +09:00
Tatsuhiro Tsujikawa
4423ece43d
Moved GZipDecoder to test
2012-09-24 22:38:59 +09:00
Tatsuhiro Tsujikawa
dc74ebeced
Removed unused code
2012-09-24 21:46:26 +09:00
Tatsuhiro Tsujikawa
8d8ba403fe
Removed proxy-connection from InterestingHeader
2012-09-23 22:33:15 +09:00
Tatsuhiro Tsujikawa
8b0bdacace
Don't send Proxy-Connection header field
...
It was deprecated long ago.
2012-09-23 21:51:53 +09:00
Tatsuhiro Tsujikawa
54665ff409
Removed static std::string constant in HttpHeader
...
This change also removes inspection of Proxy-Connection header field
when checking whether the remote endpoint keeps connection open.
2012-09-23 21:46:01 +09:00
Tatsuhiro Tsujikawa
dd7014a612
Store only interesting HTTP headers in HttpHeader
...
In this change, we defined HTTP header fields we are interested in.
We only store those headers in HttpHeader object. Accessing HTTP
headers in HttpHeader object is now done through enum values.
2012-09-23 20:59:34 +09:00
Tatsuhiro Tsujikawa
0b4dec0250
Increased shreshold of command-line option suggestion
2012-09-23 15:06:39 +09:00
Tatsuhiro Tsujikawa
295a62f538
Rewritten help tags and various internal flag handling in OptionHandler
...
Now help tags are defined as enum values to avoid vector of strings.
The internal flags are represented by bitmask to shrink size.
2012-09-23 14:59:05 +09:00
Tatsuhiro Tsujikawa
461a542c5e
Rewritten DownloadHandlerConstants
...
DownloadHandlerConstants was simplified. MIME type handling in Accept
header was also reworked. DownloadContext's metalinkServerContacted_
is replaced with acceptMetalink_ and its boolean value is reverted.
RequestGroup and HttpRequest now do not hold vector of accepting
types. HttpRequest has the flag acceptMetalink_ which will be set by
the same value of DownloadContext::accpetMetalink_ and if it is true,
Metalink MIME types are added to Accept header field.
2012-09-22 23:19:41 +09:00
Tatsuhiro Tsujikawa
9d294741fd
Rewritten FeatureConfig into set of functions
2012-09-22 20:56:39 +09:00
Tatsuhiro Tsujikawa
e2340efe27
Use std::vector instead of std::map for ContextAttribute objects
...
Now key for ContextAttribute object store is int instead of string.
2012-09-22 17:37:30 +09:00
Tatsuhiro Tsujikawa
0030025bb6
Don't set SNI hostname if it does not include "." for GNUTLS
2012-09-15 01:14:21 +09:00
Tatsuhiro Tsujikawa
393d0d9fbc
Disable SSL/TLS compression with OpenSSL
2012-09-15 01:13:52 +09:00
Tatsuhiro Tsujikawa
d0703a2f26
Code cleanup
2012-09-07 21:45:36 +09:00
Tatsuhiro Tsujikawa
763c7a0aa0
Pause download even if download is completed
...
This allows to pause and unpause BitTorrent seed.
2012-09-07 01:40:40 +09:00
Tatsuhiro Tsujikawa
f6c7aaa1cd
Use execlp() instead of execl()
2012-09-07 01:28:53 +09:00
Tatsuhiro Tsujikawa
2148cbaf1d
Fixed compile error without XML library
2012-09-02 21:04:36 +09:00
Tatsuhiro Tsujikawa
e2bf627b17
Ensure that num of commands is 0 before processing tracker response
2012-09-02 17:43:26 +09:00
Tatsuhiro Tsujikawa
3c39931566
Remove trailing white spaces
2012-09-02 17:40:11 +09:00
Tatsuhiro Tsujikawa
2a51949132
Catch exception from Socket::getPeerInfo() when pooling connection
...
Socket::getPeerInfo() may fail if its TCP connection has already
disconnected. In this case, we log this error. The success or failure
of pooling connection should not affect the later execution of the
program.
2012-09-02 17:35:50 +09:00
Tatsuhiro Tsujikawa
9840955798
Removed trailing white spaces
2012-09-01 20:54:07 +09:00
Tatsuhiro Tsujikawa
086c5701e1
Updated doc
2012-09-01 20:53:38 +09:00
Tatsuhiro Tsujikawa
ce5c016066
Cleared pre and post download handlers from BitTorrent tracker request
2012-09-01 00:53:30 +09:00
Tatsuhiro Tsujikawa
b336725ca0
Don't check control file existence if isPreLocalFileCheckEnabled() == false
2012-08-31 23:40:32 +09:00
Tatsuhiro Tsujikawa
0bbda43385
Fixed assertion error if --retry-wait is used
...
In CreateRequestCommand, if Request object returned from getRequest()
is still sleeping, CreateRequestCommand pools it back but still holds
its reference. This makes assertion error in
UnknownLengthPieceStroage::hasMissingUnusedPiece() from
AbstractCommand::execute().
2012-08-31 22:31:31 +09:00
Tatsuhiro Tsujikawa
d734ff7d29
Added new file allocation method called 'trunc'
...
--file-allocation option can now take new value 'trunc'. 'trunc' uses
ftruncate() system call or platform-specific counterpart to truncate a
file to a specified length.
2012-08-12 16:52:53 +09:00
Tatsuhiro Tsujikawa
e2fcd6d72c
Use enum to select file allocation method
2012-08-11 23:38:58 +09:00
Tatsuhiro Tsujikawa
8f1049c15f
Fixed assertion in removeRequestGroupIndex()
2012-08-03 00:27:03 +09:00
Tatsuhiro Tsujikawa
2795176d79
Add GID => RequestGroup index for faster access to RequestGroup
2012-07-31 23:55:51 +09:00
Tatsuhiro Tsujikawa
329a17b3f9
Removed tailing whitespaces
2012-07-31 21:26:59 +09:00
Tatsuhiro Tsujikawa
3465906969
Added missing sources to SRCS
2012-07-30 22:31:09 +09:00
Tatsuhiro Tsujikawa
c1ddf34e4b
Specify torrent file explicitly in createRequestGroupForBitTorrent()
2012-07-26 21:20:08 +09:00
Tatsuhiro Tsujikawa
01e1fdaf49
Parse torrent file on the fly if --follow-torrent=mem is given
...
In this changes, Bencode parser in bencode2 is removed and the request
is delegated to BencodeParser.
2012-07-26 21:07:10 +09:00
Tatsuhiro Tsujikawa
7176107414
BencodeParser: fixed parser failure due to the uninitialized variables
2012-07-26 20:42:02 +09:00
Tatsuhiro Tsujikawa
8311d6ef87
Added stream Bencode parser
2012-07-24 23:50:06 +09:00
Tatsuhiro Tsujikawa
9620bb0a6d
Fix off by 1 error in JsonParser::parseUpdate() return value
2012-07-24 23:47:18 +09:00
Tatsuhiro Tsujikawa
2684db766d
Fix Android build
2012-07-24 00:05:18 +09:00
Tatsuhiro Tsujikawa
f6b2c3c080
Rewritten ExpatXmlParser
...
Put common elements in both Xml2XmlParser and ExpatXmlParser in
XmlParser.
2012-07-23 23:41:33 +09:00
Tatsuhiro Tsujikawa
4b57106a17
Check sum of file length does not exceed INT64_MAX
...
With BitTorrent or Metalink (metaurl), one RequestGroup can contain
multiple files. In this change, ensure that the sum of thoese files
must be equal or less than INT64_MAX.
2012-07-23 21:57:02 +09:00
Tatsuhiro Tsujikawa
860f4dd06a
Use int64_t instead of off_t
...
Using off_t, at least, in DiskAdaptor layer is problematic because
torrent can contain under 2GiB files but total sum of those files may
exceed 2GiB limit, which makes off_t overflow in 32 bit system without
large file support. So we use int64_t in API. We'll check the file
length before download so that it does not exceed max off_t.
2012-07-23 21:42:47 +09:00
Tatsuhiro Tsujikawa
f56743b083
Parse WebSocket RPC request on the fly without buffering
2012-07-15 00:24:59 +09:00
Tatsuhiro Tsujikawa
7100b1b9ca
Parse HTTP RPC request on the fly without buffering
2012-07-14 18:59:56 +09:00
Tatsuhiro Tsujikawa
5352d76d4f
Added reset() API to ParserStateMachine
...
Not unittested
2012-07-13 00:53:56 +09:00
Tatsuhiro Tsujikawa
70685bd233
Rewritten Xml2XmlParser
...
Now it is push parser + utility function for file parsing.
2012-07-11 23:20:48 +09:00
Tatsuhiro Tsujikawa
cd67e27ca4
Check structure depth when parsing JSON
2012-07-11 23:20:20 +09:00
Tatsuhiro Tsujikawa
57b46d5123
Added streaming parser for structured data format.
...
Added JSON streaming parser. Note that currently JSON parser ignores
frac and exp parts of number construct.
2012-07-10 01:42:42 +09:00
Tatsuhiro Tsujikawa
e3b8c92434
Added TLS SNI support
2012-07-06 23:07:10 +09:00
Tatsuhiro Tsujikawa
b00ed1aa30
More http header parser tests
2012-07-06 00:57:18 +09:00
Tatsuhiro Tsujikawa
f04090199f
Rewritten timegm replacement function
...
The algorithm is based on Python 2.7 calendar.timegm.
2012-07-06 00:34:37 +09:00
Tatsuhiro Tsujikawa
4046f27ea9
Use system-wide certificates for SSL
...
Use system-wide certificates for SSL. For GnuTLS it requires the
latest version, 3.0.20. OpenSSL had it for longer. This means that if
SSL library is properly configured to locate system-wide certificates
store, the user don't have to use --ca-certificate option. Also
packagers don't have to use --with-ca-bundle configure option.
Patch from Cristian Morales Vega
2012-07-05 23:22:34 +09:00
Tatsuhiro Tsujikawa
b25d8a9923
Code cleanup
2012-07-04 22:59:15 +09:00
Tatsuhiro Tsujikawa
995c07c184
Fixed base64::decode() return "" if input ends with garbase and no padding
2012-07-04 22:51:41 +09:00
Tatsuhiro Tsujikawa
aa944f4ef6
Guarded include of stdint.h and inttypes.h
2012-07-04 00:00:24 +09:00
Tatsuhiro Tsujikawa
98e1c6c580
Code cleanup
2012-07-03 21:56:26 +09:00
Sergey Zolotarev
1c39b9474e
Fixed ssize_t error on MinGW
2012-07-03 17:44:48 +06:00
Tatsuhiro Tsujikawa
5d3b6801b1
Changed default Peer ID prefix
...
The new Peer ID prefix is "A2-$MAJOR-$MINOR-$MICRO-", where $MAJOR,
$MINOR and $MICRO are the major version, the minor version and the
micro version respectively. For instance, 1.15.2 release of aria2 will
use "A2-1-15-2-".
2012-06-29 23:38:12 +09:00
Tatsuhiro Tsujikawa
0c8ec9c325
Merged Android build scripts
2012-06-29 00:51:13 +09:00
Tatsuhiro Tsujikawa
f1017d5def
Don't percent-decode filename value in Content-Disposition.
...
We only percent-decode filename* value in Content-Disposition because
the encoding is fully specified. But since filename value is not, so
we just accept it as is.
2012-06-28 23:18:50 +09:00
Tatsuhiro Tsujikawa
c30ea8adeb
Don't sum in-flight piece which does not intersect filtered ranges
...
When calculating completed length, don't sum the completed length of
piece which does not intersect filtered ranges.
2012-06-27 23:28:57 +09:00
Tatsuhiro Tsujikawa
68f225de0b
Use stack allocation+reference instead of pointer for BufferedFile
2012-06-27 01:38:27 +09:00
Tatsuhiro Tsujikawa
a6775db3ca
Fixed segmentation fault when logger failed to open log file
2012-06-27 01:38:18 +09:00
Tatsuhiro Tsujikawa
16d395779a
Removed static_cast<int64>()s where they are unnecessary
2012-06-25 23:44:52 +09:00
Tatsuhiro Tsujikawa
1b874268a0
Use int64_t instead of off_t
...
Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator
and ChecksumValidator are left unchanged.
2012-06-25 23:35:24 +09:00
Tatsuhiro Tsujikawa
4b03634f36
Use PRId64 for int64_t format specifier
2012-06-25 22:43:33 +09:00
Tatsuhiro Tsujikawa
3620d271af
Process as many messages as possible in recv buffer
2012-06-25 21:37:55 +09:00
Tatsuhiro Tsujikawa
e816c5eee4
Rewritten PeerConnection::receiveMessage()
...
The old implementation calls at least 2 read(2) (4bytes length and
payload) to receive the message. This change will read as many bytes
as possible in one read(2) call. BtPieceMessage::data_ is now just a
const pointer to the internal buffer of PeerConnection.
2012-06-25 21:35:52 +09:00
Tatsuhiro Tsujikawa
73b75186c7
Handle the case when MINGW32 vsnprintf returns -1
...
MINGW32 vsnprintf returns -1 if output is truncated. Increased buffer
for vsnprintf in WinConsoleFile and fmt.
2012-06-24 16:56:34 +09:00
Tatsuhiro Tsujikawa
96720b297d
Added --enable-mmap option.
...
If this option is used, map files into memory using mmap(2). This
option is experimental.
2012-06-24 16:28:04 +09:00
Tatsuhiro Tsujikawa
38426d744b
Code cleanup
2012-06-23 17:50:27 +09:00
Tatsuhiro Tsujikawa
5fc1b1ad29
Rewritten HTTP header parser
2012-06-23 17:34:20 +09:00
Tatsuhiro Tsujikawa
5a0a62c5f4
Added CORS preflight request support.
...
This change is based on the patch from binux.
2012-06-23 16:26:17 +09:00
Tatsuhiro Tsujikawa
9ba65aea1d
Rewritten ChunkedDecodingStreamFilter
2012-06-18 23:42:46 +09:00
Tatsuhiro Tsujikawa
afcd95dec7
Return appropriate HTTP status code on RPC failure.
...
In this change, we return 404 if the request path is neither /json-rpc
nor /rpc. If XML feature is not enabled and /rpc is requested, return
404. If XML parser failed, return 400. JSON parser failure has been
handled well in the existing code.
2012-05-19 18:36:57 +09:00
Tatsuhiro Tsujikawa
68eb1b6737
Ignore unacceptable options in RPC request instead of throwing error.
...
This change allows RPC client to send same options for the different
type of downloads.
2012-05-17 22:52:39 +09:00
Tatsuhiro Tsujikawa
92c518a2ba
Moved parseAsyncDNSServers() to AsyncNameResolver.cc and refactored.
...
The parseAsyncDNSServers() now uses net::getBinAddr() internally,
which makes the function simpler. Also added unit test.
2012-05-16 23:05:09 +09:00
Tatsuhiro Tsujikawa
36051cca5e
Handle sockaddr_in.sin_len and sockaddr_in6.sin6_len
...
Check sockaddr_in.sin_len and sockaddr_in6.sin6_len are available and
assign values to them properly. This change fixes unit test error and
most error related to getnameinfo() on netbsd.
2012-05-16 22:43:25 +09:00
Tatsuhiro Tsujikawa
ca60020fa4
Removed dependency on inet_aton
...
Implemented inetPton as a replacement of inet_aton. inetPton is
implemented using net::getBinAddr.
This change fixes bug#3525424.
2012-05-14 01:17:50 +09:00
Tatsuhiro Tsujikawa
19798f09ae
Fixed typo
2012-05-12 19:33:33 +09:00
Tatsuhiro Tsujikawa
a998e32f95
Call ERR_clear_error() before OpenSSL I/O functions.
...
Use ERR_get_error() with ERR_error_string().
2012-05-08 01:02:18 +09:00
Tatsuhiro Tsujikawa
d16071d108
Fixed the bug which prevents --bt-lpd-interface from working.
...
Fixes bug#3520125
2012-04-22 18:35:43 +09:00
Tatsuhiro Tsujikawa
f5d3cd1bb0
Updated copyright year
2012-04-08 21:43:00 +09:00
Tatsuhiro Tsujikawa
aee28c8b0d
Fixed compile warning with clang
2012-04-08 19:22:23 +09:00
Tatsuhiro Tsujikawa
1e0068e4d4
WebSocket: Check keyword string in comma separeted values in HTTP
...
header field.
2012-04-08 19:00:07 +09:00
Tatsuhiro Tsujikawa
c648ca0c5c
Include common.h from a2algo.h and a2functional.h
2012-04-08 18:59:06 +09:00
Tatsuhiro Tsujikawa
52826433d9
Fixed typo
2012-04-08 17:51:01 +09:00
Tatsuhiro Tsujikawa
9e8676af2c
Disable IPv6 by default only if MinGW 32bit build.
2012-04-08 17:45:33 +09:00
Tatsuhiro Tsujikawa
d9bb24a2e0
Fixed gcc-4.7 warnings
2012-04-08 03:12:29 +09:00
Tatsuhiro Tsujikawa
fcbdecfd1e
Conditional compile for WebSocket.
...
WebSocket support depends on Message Digest support.
2012-04-08 00:50:25 +09:00
Tatsuhiro Tsujikawa
7bc2a14d9f
Fixed compile error without BitTorrent support
2012-04-08 00:05:42 +09:00
Tatsuhiro Tsujikawa
ef86d760cc
Use CreateProcessW instead of CreateProcessA
2012-04-07 23:57:49 +09:00
Tatsuhiro Tsujikawa
3f7561b80c
Define HAVE_GETADDRINFO only if it is not defined in MinGW build.
2012-04-07 23:56:37 +09:00
Tatsuhiro Tsujikawa
fcb102b650
Fixed compile error with i686-w64-mingw32
2012-04-07 21:26:33 +09:00
Tatsuhiro Tsujikawa
840ca5adb6
Check availability of pwd.h
2012-04-07 15:49:22 +09:00
Tatsuhiro Tsujikawa
c7c26e67c4
Disable IPv6 for MinGW build by default
2012-04-07 15:40:33 +09:00
Tatsuhiro Tsujikawa
65a20f5070
First check there is wildcard character or not in tls hostname check.
2012-04-01 22:07:01 +09:00
Tatsuhiro Tsujikawa
b9471d7452
Compare IPAddress in commonName as string.
...
Added test for net::verifyHostname().
2012-04-01 16:42:38 +09:00
Tatsuhiro Tsujikawa
b68e0a5527
Use net::verifyHostname() with gnutls.
...
We now don't use gnutls_x509_crt_check_hostname() any more.
2012-03-31 21:21:18 +09:00
Tatsuhiro Tsujikawa
e6f04416d9
Don't use locale dependent toupper and tolower.
2012-03-31 00:06:55 +09:00
Tatsuhiro Tsujikawa
0a9abd89c6
Rewritten TLS hostname check based on RFC 6125.
2012-03-30 23:49:14 +09:00
Tatsuhiro Tsujikawa
e4e9562c92
Get the home directory of the effective user ID using getpwuid() if
...
$HOME is not defined.
2012-03-30 01:43:38 +09:00
Tatsuhiro Tsujikawa
25ef6677e9
Added hostname check described in RFC 2818 with OpenSSL.
2012-03-28 23:28:22 +09:00
Tatsuhiro Tsujikawa
06b6bef860
Made WebSocket handshake more strict.
...
Refactored HttpServer as well.
2012-03-25 22:10:36 +09:00
Tatsuhiro Tsujikawa
8499a47d21
Added --bt-remove-unselected-file option.
...
Removes the unselected files when download is completed in
BitTorrent. To selecting files, use --select-file option. If it is not
used, all files are assumed to be selected. Please use this option
with care because it will actually remove files from your disk.
This option is default to false.
2012-03-25 19:25:43 +09:00
Tatsuhiro Tsujikawa
2b3469dad9
Use std::set for socketEntries_ and nameResolverEntries_ in PortEventPoll
2012-03-25 00:38:57 +09:00
Tatsuhiro Tsujikawa
ae393329f7
Fixed segmentation fault in open solaris in unit test.
...
This is due to the fact that the maximum value of random() in open
solaris is not RAND_MAX, but (2**31)-1.
2012-03-25 00:28:11 +09:00
Tatsuhiro Tsujikawa
4d8c17d104
Fixed compile error on open solaris
...
Fixes bug#3497518
2012-03-25 00:27:25 +09:00
Tatsuhiro Tsujikawa
d8948056b3
Use std::set for socketEntries_ and nameResolverEntries_ in KqueueEventPoll
2012-03-24 21:19:57 +09:00
Tatsuhiro Tsujikawa
eed804baaa
Use std::set instead of std::deque if the elements are sorted and
...
insertions and deletions are frequent.
2012-03-23 01:34:37 +09:00
Tatsuhiro Tsujikawa
332bda83b4
Enable TCP_NODELAY for WebSocket connection.
2012-03-21 02:08:18 +09:00
Tatsuhiro Tsujikawa
0792540bf2
Prefixed notification method name with "aria2."
2012-03-21 01:35:48 +09:00
Tatsuhiro Tsujikawa
f4e2c7f060
Added JSON-RPC over WebSocket.
...
Wslay library must be placed under deps/wslay.
2012-03-20 21:42:09 +09:00
Tatsuhiro Tsujikawa
5bff877eae
Fixed assertion failure if Chunked encoding along with Content-Length is used.
2012-03-05 12:45:05 +09:00
Tatsuhiro Tsujikawa
e73c3c53ff
Fixed clang warning and errors.
...
Test for the zero-length array with A2_ARRAY_LEN was commented out
since it is only used in unit test code and clang and old gcc 3.4.3
emit error.
2012-03-01 00:02:29 +09:00
Tatsuhiro Tsujikawa
037f1512db
Added BufferedFile::getLine() to make reading one line more flexible.
...
Fixes bug#3495336
2012-02-29 02:50:12 +09:00
Tatsuhiro Tsujikawa
c63a524a88
Added .gitignore files
2012-02-27 21:49:01 +09:00
Tatsuhiro Tsujikawa
f4e0eae904
Added checkRequiredInteger() to check integer param is in valid range.
...
Ensure that fileIndex in aria2.changeUri RPC method is greater than or
equal to 1.
2012-02-26 21:49:37 +09:00
Tatsuhiro Tsujikawa
ad11d746f0
Only accepts 32 bit integer values from int and i4 elements in XML-RPC.
...
Fixed overflow in AbstractPaginationRpcMethod::getPaginationRange().
Fixes bug#3494165
2012-02-26 19:45:25 +09:00
Tatsuhiro Tsujikawa
663cfec9f6
Fixed the bug that aria2 does not listen on address given in --interface.
2012-02-22 22:45:01 +09:00
Tatsuhiro Tsujikawa
075ea06ad7
Supported Windows UNC path.
2012-02-19 21:19:11 +09:00
Tatsuhiro Tsujikawa
b7dbcea58b
Check scheme part in redirected URI more strictly.
...
The previous implementation mistakenly sees '/abspath?uri=http://foo '
as an absolute URI because it contains '://', but actually it is not.
This change checks scheme part is constructed in the allowed character
set described in RFC 3986 Section 3.1.
2012-02-15 01:40:12 +09:00
Tatsuhiro Tsujikawa
9e302b86df
Code cleanup: use empty() to check size() == 0
2012-02-12 23:21:25 +09:00
Tatsuhiro Tsujikawa
7dc2b9ff16
Allow missing params in XML-RPC request.
...
Now following request is legal:
<methodCall>
<methodName>aria2.getVersion</methodName>
</methodCall>
2012-02-12 23:13:21 +09:00
Tatsuhiro Tsujikawa
9b7e4219d9
Reserve PeerConnection's buffer capacity according to number of pieces.
...
If the number of pieces gets bigger, the length of Bitfield message
payload exceeds the initial buffer capacity of PeerConnection, which
is MAX_PAYLOAD_LEN. We expand buffer as necessary so that
PeerConnection can receive the Bitfield message.
2012-02-09 01:51:42 +09:00
Tatsuhiro Tsujikawa
f2d55f0edc
Added --deferred-input option.
...
If true is given to --deferred-input option, aria2 does not read all
URIs and options from file specified by -i option at startup, but it
reads one by one when it needs later. This may reduce memory usage if
input file contains a lot of URIs to download. If false is given,
aria2 reads all URIs and options at startup. This option defaults to
false.
2012-02-05 18:57:16 +09:00
Tatsuhiro Tsujikawa
a6803c21b5
Support network-path reference in HTTP redirect.
2012-01-11 02:17:38 +09:00
Tatsuhiro Tsujikawa
2997fa0631
Refactored splitNsName
2012-01-11 02:04:20 +09:00
Tatsuhiro Tsujikawa
3b1834e633
Avoid strlen in util::streq, util::strieq, util::startsWith and util::istartsWith
2012-01-11 01:50:35 +09:00
Tatsuhiro Tsujikawa
b340c25164
Code cleanup
2012-01-11 01:23:24 +09:00
Tatsuhiro Tsujikawa
b6fd4366fe
Use short form of util::startsWith and util::endsWith
2012-01-11 01:17:51 +09:00
Tatsuhiro Tsujikawa
9331f6a43d
Removed static const char[] as much as possible.
...
Provided convenient functions for streq, strieq, startsWith,
istartsWith, endsWith, iendsWith to support this move.
2012-01-11 01:03:38 +09:00
Tatsuhiro Tsujikawa
db86ffbca9
Fixed compile error without libnettle, libgcrypt and openssl
2012-01-08 19:10:55 +09:00
Tatsuhiro Tsujikawa
1c292f469e
aria2 now doesn't assume download's completed just because file size matched
...
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.
2012-01-08 17:46:03 +09:00
Tatsuhiro Tsujikawa
b6f8a3dbb3
Use std::ifstream instead of file descriptor for generateRandomDataUrandom()
...
Usually required random bytes are short, it is advantageous to use
std::ifstream which is buffered I/O rather than read() syscall.
2012-01-08 01:21:42 +09:00
Tatsuhiro Tsujikawa
46e59c4cc3
Fixed the bug that --checksum is not working.
2012-01-08 01:15:58 +09:00
Tatsuhiro Tsujikawa
4ff29f802f
Moved PeerConnection.{h,cc} to BitTorrent resources
2012-01-08 01:09:58 +09:00
Tatsuhiro Tsujikawa
63325cfd06
Fixed compile error without libnettle, libgcrypt and openssl.
2012-01-08 01:00:02 +09:00
Tatsuhiro Tsujikawa
e6c44871c8
Fixed the bug that log file is not created if there is warning before log open
...
Use LogFactory::reconfigure() to reopen log file after setting log
filename from option.
2011-12-27 17:14:29 +09:00
Tatsuhiro Tsujikawa
973e0df748
Fixed compile error on openbsd
2011-12-26 01:00:15 +09:00
Tatsuhiro Tsujikawa
deb0983ab4
Fixed compile error on android (which does not LFS support)
2011-12-26 00:10:27 +09:00
Tatsuhiro Tsujikawa
52155b1860
No retry for close() with EINTR. Also reverted changes in d5ffa253
.
2011-12-25 23:38:36 +09:00
ITriskTI
aa070bc683
Update src/version_usage.cc
2011-12-12 16:09:45 +03:00
Tatsuhiro Tsujikawa
d4e9b07719
Fixed compile error without BitTorrent support
2011-12-11 03:13:33 +09:00
Tatsuhiro Tsujikawa
c8191700b1
Fixed compile error without BitTorrent and Metalink support
2011-12-11 00:08:13 +09:00
Tatsuhiro Tsujikawa
8fe92517d9
Removed deleted source file entry
2011-12-10 19:26:36 +09:00
Tatsuhiro Tsujikawa
3637291c22
Fixed compile warning/error with mingw32
2011-12-10 19:06:09 +09:00
Tatsuhiro Tsujikawa
ebc082747c
Log filename in the exception when AbstractDiskWriter::closeFile() failed.
2011-12-10 18:03:30 +09:00
Tatsuhiro Tsujikawa
413b61c316
FTP PASV: fixed IPv6 support.
...
If fake FTP URI cannot be parsed (this should not happen), throw
exception.
2011-12-10 17:57:31 +09:00
Tatsuhiro Tsujikawa
d5ffa2532d
AbstractDiskWriter::closeFile(): Throw exception if close() failed.
...
~AbstractDiskWriter calles closeFile(), but suppresses exception.
MultiDiskAdaptor::closeFile() logs error if child
DiskWriter::closeFile() throws exception. This exception is not
rethrown. If at least one exception is caught,
MultiDiskAdaptor::closeFile() throws new DlAbortEx.
RequestGroupMan::closeFile() just logs exception and suppress each
exception. Generally, don't call closeFile() in destructor. If you
need to call it, it must suppress the exception.
2011-12-09 23:32:38 +09:00
Tatsuhiro Tsujikawa
9a6f88c162
Use util::itos() for signed integrals
2011-12-09 21:40:22 +09:00
Tatsuhiro Tsujikawa
31163c6785
Check totalLength of file is less than std::numeric_limits<off_t>::max()
...
If totalLength is larger than std::numeric_limits<off_t>::max(), throw
DownloadFailureException.
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
7989cd898d
Use int or int32_t instead of size_t where suitable
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
30e0e19e67
Code cleanup
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
f0bcfa822e
Use int instead of unsigned int where unsigned int is not needed.
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
b97a7c8ecf
Use int32_t for begin, length in RangeBtMessage
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
9d15d732ed
Use int32_t for piece length instead of size_t
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
12988e5282
Replaced uint64_t with off_t or int64_t.
...
Since off_t is int64_t with LFS, we cannot take advantage of extra
capacity of uint64_t.
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
f25e67b017
FTP pasv: Use request host when connecting server with http proxy.
2011-12-09 21:37:54 +09:00
Tatsuhiro Tsujikawa
2eed1c3914
Fixed bug which causes segmentation fault when bad piece is got.
2011-12-09 21:34:18 +09:00