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
Tatsuhiro Tsujikawa
9752704614
Cast size_t to unsigned long for %lu
2011-12-06 23:53:43 +09:00
Tatsuhiro Tsujikawa
1ff1505916
Fixed typo and code cleanup
2011-12-03 21:41:07 +09:00
Tatsuhiro Tsujikawa
53fd815111
Use binary search in BtDependency for efficiency.
2011-12-03 18:34:07 +09:00
Tatsuhiro Tsujikawa
d1bb828066
Ignore peer which possibly sent bad data in next few minuts.
...
In aria2, one piece is downloaded from several peers, so when hash
check failed for that piece, it cannot determine which peer(s) sent
bad data. So, we ignore peer who sent last block of data in random
minutes. We use randomized timeout because all peers get waken up at
the almost same time.
2011-12-03 18:12:31 +09:00
Tatsuhiro Tsujikawa
6bf696ca11
New help messages. Added suggestion for unknown/ambiguous options.
...
The help messages shown when argument error were redesigned and less
verbose now. When unknown or ambiguous option is given, show
suggestions like "Did you mean...". Some constant values related to
levenstein distance are borrowed from git help.c.
2011-12-03 16:30:00 +09:00
Tatsuhiro Tsujikawa
26d4ca8a6a
Made notice level log messages translatable
2011-12-02 22:38:53 +09:00
Tatsuhiro Tsujikawa
dd3f688743
Made some texts translatable
2011-12-02 22:00:48 +09:00
Tatsuhiro Tsujikawa
f860bf0d50
Use %lld to fomat a2_gid_t
2011-12-02 21:36:11 +09:00
Tatsuhiro Tsujikawa
bc9fb7cb65
Fixed bug in util::parseULLIntNoThrow()
2011-12-02 00:44:33 +09:00
Tatsuhiro Tsujikawa
11c5a13534
Return true if bits == 0 in util::inSameCidrBlock()
2011-12-02 00:27:14 +09:00
Tatsuhiro Tsujikawa
031f1199d7
Added const to Option::getTable()
2011-12-01 23:36:17 +09:00
Tatsuhiro Tsujikawa
f9dd59eebd
Added missing XmlParser::parseMemory() in ExpatXmlParser.cc
2011-12-01 23:34:14 +09:00
Tatsuhiro Tsujikawa
82e5318e35
Fixed compile error with mingw
2011-12-01 23:21:56 +09:00
Tatsuhiro Tsujikawa
b89bc8a6cb
Added --stop-with-process=PID option.
...
This feature stops application when process PID is not running. This
is useful if aria2 process is forked from a parent process. The parent
process can fork aria2 with its own pid and when parent process exits
for some reason, aria2 can detect it and shutdown itself.
The code which detects whether or not given process PID is running is
contributed by Emmanuel Engelhart.
2011-12-01 23:21:44 +09:00
Tatsuhiro Tsujikawa
27dda3c65c
Support IPv6 address for FTP via HTTP tunneling.
...
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.
2011-11-14 23:19:37 +09:00
Tatsuhiro Tsujikawa
97a9242cbe
Proxy URI is now constructed in getProxyUri().
...
The previous implementation constructs proxy URI in OptionHandler but
it cannot handle with the situation when user, password and proxy URI
is given various order. Now we just set rules: username set in
--*-proxy-user overrides username in --*-proxy option, no matter in
any order username, password and proxy URI are parsed. Likewise,
password set in --*--proxy-passwd overrides password in --*-proxy
option.
2011-11-13 23:06:24 +09:00
Tatsuhiro Tsujikawa
c42dd7e755
Changed format of ETA.
...
Now no leading 0 is used. If hour part and/or min part is non-zero,
and sec part is 0, sec part is omitted, like this "1h3m".
2011-11-13 20:59:15 +09:00
Tatsuhiro Tsujikawa
1687741303
Use fmt instead of util::itos
2011-11-13 20:55:06 +09:00
Tatsuhiro Tsujikawa
9e5124eb11
Include trailing "/" in UriStruct::dir.
...
The duplicate "/"s in dir are not removed now.
2011-11-12 22:36:05 +09:00
Tatsuhiro Tsujikawa
c0dda6a0f7
Changed createSockPoolKey so that we can support IPv6 numeric address safely.
2011-11-12 21:31:14 +09:00
Tatsuhiro Tsujikawa
db5cc4db27
Don't append character to std::string.
2011-11-12 21:27:24 +09:00
Tatsuhiro Tsujikawa
5347efb967
Use fmt instead of using snprintf directly
2011-11-12 19:33:38 +09:00
Tatsuhiro Tsujikawa
0da2468d6b
Removed strappend
2011-11-12 19:24:38 +09:00
Tatsuhiro Tsujikawa
2e5d9b056f
Removed strconcat
2011-11-12 18:17:34 +09:00
Tatsuhiro Tsujikawa
c4e66390ac
Code cleanup
2011-11-12 17:13:43 +09:00
Tatsuhiro Tsujikawa
f1f1b991f1
Removed SocketBuffer::pushStrSwap.
2011-11-12 01:19:01 +09:00
Tatsuhiro Tsujikawa
f0f1cfab5c
Use util::strifind instead of std::toLower and std::string::find.
2011-11-12 01:13:55 +09:00
Tatsuhiro Tsujikawa
2f4393d17c
Rewritten parse*Int
2011-11-12 01:06:52 +09:00
Tatsuhiro Tsujikawa
226480ad60
Made const char[] static
2011-11-11 23:00:41 +09:00
Tatsuhiro Tsujikawa
d17ea2837b
HttpHeader::fill() now stores header name in lowercase.
...
Find methods in HttpHeader won't lowercase argument, so use lowercase
letters to get HTTP header field.
2011-11-11 22:50:18 +09:00
Tatsuhiro Tsujikawa
35a3f41346
Made Pref::k_, OptionHandler::getName() and getDescription() const char*.
2011-11-11 01:59:23 +09:00
Tatsuhiro Tsujikawa
787bfd75da
Use XmlParser for XML-RPC.
2011-11-11 00:37:32 +09:00
Tatsuhiro Tsujikawa
3b4a368554
Rewritten Expat Metalink XML parser.
2011-11-10 23:28:12 +09:00
Tatsuhiro Tsujikawa
440f29aca3
Rewritten Metalink XML parser.
...
Now we don't strip white spaces while parsing Metalink V3 document.
Expat implementation does not included in this change.
2011-11-10 22:38:01 +09:00
Tatsuhiro Tsujikawa
f114a6fba4
Now xml attribute and characters in RPC request is not stripped at all.
...
Changed XmlRpcRequestParserState so that name is now const char*.
2011-11-09 00:21:02 +09:00
Tatsuhiro Tsujikawa
bdaa87c73b
Avoid temporary string
2011-11-08 23:53:12 +09:00
Tatsuhiro Tsujikawa
7f8724c501
Removed temporary string
2011-11-08 23:45:40 +09:00
Tatsuhiro Tsujikawa
6ed36b73c1
Code cleanup
2011-11-08 23:27:23 +09:00
Tatsuhiro Tsujikawa
aa6f9c2057
Removed unused code
2011-11-08 23:13:47 +09:00
Tatsuhiro Tsujikawa
2ca98cc428
Use std::search instead of creating temporary std::string.
2011-11-08 00:59:49 +09:00
Tatsuhiro Tsujikawa
72a1847ba8
Rewritten *ARC4Encryptor. Removed *ARC4Context.
...
Now *ARC4Encryptor supports in-place encryption.
2011-11-08 00:50:07 +09:00
Tatsuhiro Tsujikawa
f6f053cae1
Fixed out of array bound
2011-11-08 00:15:37 +09:00
Tatsuhiro Tsujikawa
02b3873e6d
Removed ARC4Decryptor because ARC4Encryptor can decrypt the message.
2011-11-07 22:24:47 +09:00
Tatsuhiro Tsujikawa
30fdb08f40
Rewritten parametered URI handling routine.
2011-11-06 16:37:02 +09:00
Tatsuhiro Tsujikawa
d45d854926
Rewritten base64::decode and base64::encode
2011-11-05 23:30:46 +09:00
Tatsuhiro Tsujikawa
17a1b51a76
mv Base64.{cc,h} base64.{cc,h}
2011-11-05 21:13:49 +09:00
Tatsuhiro Tsujikawa
0c162dfbfb
Made util::fromHex and base32::decode function template
2011-11-05 18:05:23 +09:00
Tatsuhiro Tsujikawa
6ea1b68db1
Added SocketBuffer::pushStrSwap
2011-11-05 17:28:48 +09:00
Tatsuhiro Tsujikawa
4dad3ded15
Use SocketBuffer::pushBytes instead of pushStr in MSEHandshake.
2011-11-05 17:03:38 +09:00
Tatsuhiro Tsujikawa
5e2a8b2d4c
Fixed bug that some information such as port number is lost if
...
redirect URI contains only path component.
2011-11-05 13:16:45 +09:00
Tatsuhiro Tsujikawa
0b515d7204
Use uri::UriStruct in Request.h
2011-11-05 13:00:40 +09:00
Tatsuhiro Tsujikawa
7d68c40a77
Made decoderawstring return pair of iterators, not string.
2011-11-05 12:15:34 +09:00
Tatsuhiro Tsujikawa
d1d4903665
Rewritten bencode2::decode functions
2011-11-05 12:01:57 +09:00
Tatsuhiro Tsujikawa
d305432ec0
Code cleanup. Avoid std::string temporaries.
2011-11-05 01:26:09 +09:00
Tatsuhiro Tsujikawa
1d56c17225
Code cleanup. Avoid std::string temporaries.
2011-11-05 01:11:04 +09:00
Tatsuhiro Tsujikawa
150c1ab0c3
Code cleanup
2011-11-05 00:45:09 +09:00
Tatsuhiro Tsujikawa
5c88f61269
Added util::istartsWith()
2011-11-05 00:33:35 +09:00
Tatsuhiro Tsujikawa
79876af88f
Removed util::endsWith(a, b). Added util::iendsWith()
2011-11-05 00:25:24 +09:00
Tatsuhiro Tsujikawa
601ec0f44a
Removed util::startsWith(a, b)
2011-11-04 23:43:32 +09:00
Tatsuhiro Tsujikawa
f84d2253b2
Rewritten util::split and added its iterator version.
...
Iterator based functions util::startsWith, util::endsWith,
util::streq, util::strieq were added.
2011-11-04 22:27:58 +09:00
Tatsuhiro Tsujikawa
6267676e8b
util::divide now takes iterators as arguments.
2011-11-03 23:09:03 +09:00
Tatsuhiro Tsujikawa
118626afc4
util::percentDecode now takes iterators as arguments.
2011-11-03 19:27:29 +09:00
Tatsuhiro Tsujikawa
0e55fdf594
Code cleanup
2011-11-03 18:59:56 +09:00
Tatsuhiro Tsujikawa
84bc2c7ae8
Use std::string::append instead of appending std::string() temporaries.
2011-11-03 18:56:47 +09:00
Tatsuhiro Tsujikawa
9bb914b76e
Changed parse*Int functions so that it accepts iterators.
2011-11-03 18:51:31 +09:00
Tatsuhiro Tsujikawa
6ef91d60b3
Rewritten util::stripIter(), which now returns pair of iterator.
2011-11-03 16:19:21 +09:00
Tatsuhiro Tsujikawa
e8d4deecad
Rewritten HttpHeader::fill()
2011-11-03 00:31:27 +09:00
Tatsuhiro Tsujikawa
d9833743d9
Use merged option values.
2011-11-02 00:32:58 +09:00
Tatsuhiro Tsujikawa
1a418b518c
--index-out option is now available in aria2.changeOption.
...
--index-out option is now available in aria2.changeOption if a
download is waiting/paused in queue.
2011-11-02 00:27:31 +09:00
Tatsuhiro Tsujikawa
f884ad8339
Rewritten parseIndexPath. Renamed createIndexPathMap as createIndexPaths.
2011-11-02 00:18:39 +09:00
Tatsuhiro Tsujikawa
701a2d6ff8
--dir and --out option is now available in aria2.changeOption.
...
--dir and --out option is now available in aria2.changeOption if a
download is waiting/paused in queue.
2011-11-02 00:01:25 +09:00
Tatsuhiro Tsujikawa
9a51cc356b
Changed interface of BtRegistry.
...
BtRegistry now uses SharedHandle<BtObject> instead of BtObject.
2011-11-01 23:13:13 +09:00
Tatsuhiro Tsujikawa
a88a8b4ed1
Removed default value from deprecated --metalink-servers option.
2011-10-31 23:06:51 +09:00
Tatsuhiro Tsujikawa
22a3e44d36
SegList: Don't allow copying
2011-10-31 23:04:37 +09:00
Tatsuhiro Tsujikawa
57b37db8a1
--max-connection-per-server option is now available in aria2.changeOption.
...
--max-connection-per-server option is now available in
aria2.changeOption if a download is waiting/paused in queue.
2011-10-31 22:43:05 +09:00
Tatsuhiro Tsujikawa
9e2624a265
Apply PREF_MAX_CONNECTION_PER_SERVER to BitTorrent WEB Seeding hosts.
2011-10-31 22:05:56 +09:00
Tatsuhiro Tsujikawa
e2e711fba8
Reuse in-flight and pooled URIs when a download is paused.
2011-10-31 21:53:24 +09:00
Tatsuhiro Tsujikawa
4532881eb6
Code cleanup
2011-10-30 22:39:29 +09:00
Tatsuhiro Tsujikawa
84b19f154a
Deprecated --metalink-server option. Use --split option instead.
2011-10-30 21:36:36 +09:00
Tatsuhiro Tsujikawa
fc7af71aa8
--split option is now available in aria2.changeOption.
...
--split option is now available in aria2.changeOption if a download is
waiting/paused in queue.
2011-10-30 19:23:27 +09:00
Tatsuhiro Tsujikawa
1d9e673a68
--select-file option is now available in aria2.changeOption
...
--select-file option is now available in aria2.changeOption if a
download is waiting/paused in queue.
2011-10-30 19:13:40 +09:00
Tatsuhiro Tsujikawa
4552bb8c21
Code cleanup
2011-10-30 15:11:22 +09:00
Tatsuhiro Tsujikawa
4a455b5afe
Removed IntSequence and Sequence<T>
2011-10-30 15:08:44 +09:00
Tatsuhiro Tsujikawa
95586f594f
Use SegList<int> instead of IntSequence in Metalink2RequestGroup.
2011-10-30 15:04:15 +09:00
Tatsuhiro Tsujikawa
a6ea8531e7
Code cleanup
2011-10-30 14:42:19 +09:00
Tatsuhiro Tsujikawa
4be395117d
Use SegList<int> instead of IntSequence.
2011-10-30 14:25:36 +09:00
Tatsuhiro Tsujikawa
e9b86f2f43
Use SegList<int> instead of IntSequence in PeerListenCommand::bindPort()
2011-10-30 13:07:48 +09:00
Tatsuhiro Tsujikawa
d1667ea246
sgl.normalize() must be called before DownloadContext::setFileFilter() call.
...
sgl.normalize() was removed from DownloadContext::setFileFilter().
2011-10-30 00:51:06 +09:00
Tatsuhiro Tsujikawa
9b62a6e1fe
Made max value of --select-file to 65535
2011-10-30 00:45:10 +09:00
Tatsuhiro Tsujikawa
e23e9a4a65
Code cleanup
2011-10-30 00:13:08 +09:00
Tatsuhiro Tsujikawa
5749647ae5
Use SegList<int> instead of IntSequence in DownloadContext::setFileFilter()
2011-10-29 23:33:48 +09:00
Tatsuhiro Tsujikawa
78c3bcd199
Added SegList<T>, replacement of Sequence<T>
2011-10-29 21:51:58 +09:00
Tatsuhiro Tsujikawa
695c65eb86
--lowest-speed-limit option is now available in aria2.changeOption.
...
--lowest-speed-limit option is now available in aria2.changeOption if
a download is waiting/paused in queue.
2011-10-29 19:11:22 +09:00
Tatsuhiro Tsujikawa
95c7cb9f3e
--checksum option is now available in aria2.changeOption.
...
--checksum option is now available in aria2.changeOption if download
is waiting/paused in queue.
2011-10-29 19:08:04 +09:00
Tatsuhiro Tsujikawa
7cba24e8b2
Options for -i list is now available in aria2.changeOption.
...
Options for -i list, except for PREF_CHECKSUM, PREF_DIR, PREF_DRY_RUN,
PREF_INDEX_OUT, PREF_LOWEST_SPEED_LIMIT,
PREF_MAX_CONNECTION_PER_SERVER, PREF_METALINK_BASE_URI, PREF_OUT,
PREF_PIECE_LENGTH, PREF_SELECT_FILE, PREF_SPLIT, PREF_PAUSE and
PREF_PARAMETERIZED_URI, are available in aria2.changeOption if the
download is waiting state, including paused downloads.
2011-10-29 18:50:52 +09:00
Tatsuhiro Tsujikawa
0ba6f8c352
Use same domain-match algorithm for no-proxy and netrc.
...
Now "example.org" does not domain-match ".example.org" in both
functions.
2011-10-29 00:16:46 +09:00
Tatsuhiro Tsujikawa
5b0a2cb96b
Updated doc
2011-10-27 21:38:48 +09:00
Tatsuhiro Tsujikawa
33ba91fbc6
Fixed compile error without message digest support.
2011-10-25 21:59:10 +09:00
Tatsuhiro Tsujikawa
dfd214b3db
Disallowed checksum, index-out, out, pause and select-file option in
...
aria2.changeGlobalOption.
2011-10-25 21:56:16 +09:00
Tatsuhiro Tsujikawa
12659c74a8
Don't copy Option in RequestGroup ctor.
...
Copy on receive is not a practice in aria2 source code.
2011-10-25 21:44:04 +09:00
Tatsuhiro Tsujikawa
249fd90c92
Made -i list options available in aria2.changeGlobalOption.
2011-10-22 23:22:34 +09:00
Tatsuhiro Tsujikawa
2ef6b34e60
Made --download-result, --save-session, --server-stat-of and
...
--save-cookies option available in aria2.changeGlobalOption.
2011-10-22 23:08:40 +09:00
Tatsuhiro Tsujikawa
23a83deb4f
Renamed NameMatchOptionHandler as AbstractOptionHandler.
2011-10-22 22:57:44 +09:00
Tatsuhiro Tsujikawa
3d767543e6
Removed OptionHandler::{get,set}OptionID() and canHandle().
...
Removed typedefs in OptionHandler and NameMatchOptionHandler.
2011-10-22 22:52:23 +09:00
Tatsuhiro Tsujikawa
1872aef953
Made --max-download-result option available in aria2.changeGlobalOption.
2011-10-22 22:43:07 +09:00
Tatsuhiro Tsujikawa
c8ed44b18f
Made --uri-selector option available in -i list.
2011-10-22 21:49:46 +09:00
Tatsuhiro Tsujikawa
6bc6825cec
Renamed OptionHandler::setGlobalChangeOption() as setChangeGlobalOption().
2011-10-22 21:23:42 +09:00
Tatsuhiro Tsujikawa
5a29813d24
OptionHandler now knows its option can be used in -i list option,
...
changeable in aria2.changeOption or aria2.changeGlobalOption.
OptionHandler also now its option is cumulative.
2011-10-22 19:08:20 +09:00
Tatsuhiro Tsujikawa
d5c8d048ef
Rewritten OptionParser. Made it simpler and efficient.
2011-10-22 01:03:14 +09:00
Tatsuhiro Tsujikawa
3832ed97c6
Rewritten Option. Introduced Pref.
...
Now preference key is Pref instead of just string. It has Option
ID. Now option lookup and setting takes O(1) using Pref object.
2011-10-21 21:56:42 +09:00
Tatsuhiro Tsujikawa
20e781c2df
Code cleanup
2011-10-20 00:11:41 +09:00
Tatsuhiro Tsujikawa
9b4855a5f0
Use sockaddr_union instead of sockaddr_storage.
2011-10-20 00:06:44 +09:00
Tatsuhiro Tsujikawa
c01c34f24a
Use sockaddr_union in parseAsyncDNSServers().
2011-10-19 23:29:23 +09:00
Tatsuhiro Tsujikawa
138130497f
Rewritten bittorrent::packcompact() using net::getBinAddr().
2011-10-19 23:24:28 +09:00
Tatsuhiro Tsujikawa
3837be82c8
Removed redundant call of util::isNumericHost().
2011-10-19 23:21:10 +09:00
Tatsuhiro Tsujikawa
74e5aa0ace
Rewritten util::inSameCidrBlock() to support IPv6 address.
...
We also introduced union sockaddr_union in a2netcompat.h.
2011-10-19 23:14:13 +09:00
Tatsuhiro Tsujikawa
2b68f72fa6
Fixed bug that generateRandomData() does not populate data at the
...
first call.
2011-10-19 00:43:52 +09:00
Tatsuhiro Tsujikawa
4f0a45abe2
Made toXml and toJson non-member function.
2011-10-18 00:55:58 +09:00
Tatsuhiro Tsujikawa
e700d2bb1f
Made LpdMessage struct
2011-10-18 00:47:14 +09:00
Tatsuhiro Tsujikawa
fc4d38d236
Rewritten HttpProxyOptionHandler using uri::parse().
...
Removed test case where username is empty and resulted URI has empty
username in URI.
2011-10-18 00:40:43 +09:00
Tatsuhiro Tsujikawa
065fb3a6b8
HttpProxyOptionHandler: Enclose hostname with square brackets if
...
hostname is IPv6 numeric address.
2011-10-15 23:10:00 +09:00
Tatsuhiro Tsujikawa
2d6e087f58
Use /dev/urandom in generateRandomData() if available.
2011-10-13 23:12:05 +09:00
Tatsuhiro Tsujikawa
dbb08c08ed
Simplified IteratableChecksumValidator
2011-10-13 22:07:22 +09:00
Tatsuhiro Tsujikawa
ba87268d1c
Simplified IteratableChunkChecksumValidator
2011-10-13 22:05:18 +09:00
Tatsuhiro Tsujikawa
2f59ce0048
Renamed DownloadResult::bitfieldStr to bitfield and changed its
...
content from hex string to raw byte string.
2011-10-13 21:57:33 +09:00
Tatsuhiro Tsujikawa
6404f119e1
Renamed DownloadResult::infoHashStr to infoHash and changed its
...
contents from hex digest to raw byte string.
2011-10-13 21:52:08 +09:00
Tatsuhiro Tsujikawa
310e58bc62
Stored hash value as raw byte string, instead of hex digest.
2011-10-13 21:40:07 +09:00
Tatsuhiro Tsujikawa
d83f42ef36
s/STD_INPUT_HANDLE/STD_OUTPUT_HANDLE/
2011-10-05 22:52:03 +09:00
Tatsuhiro Tsujikawa
8938cef9b3
Made several messages translatable
2011-10-02 16:14:03 +09:00
Tatsuhiro Tsujikawa
a077ddd111
Fixed compile error with --without-libxml2 --without-libexpat
2011-09-28 23:41:22 +09:00
Tatsuhiro Tsujikawa
5ce9af94ce
Check libgcrypt version is greater or equal to required version.
...
This will fixes Debian bug#642989.
2011-09-28 23:40:34 +09:00
Tatsuhiro Tsujikawa
7e7aeac3ff
Added --piece-length option.
...
This option sets a piece length for HTTP/FTP downloads. This is the
boundary when aria2 splits a file. All splits occur at multiple of
this length. This option will be ignored in BitTorrent downloads. It
will be also ignored if Metalink file contains piece hashes.
2011-09-27 21:48:41 +09:00
Tatsuhiro Tsujikawa
05104ba177
Removed asString, asList, ... and use downcast<T> instead.
2011-09-26 21:45:45 +09:00
Tatsuhiro Tsujikawa
374955da0d
Throw exception if parameter has wrong type in RPC method.
...
Formally, depending on the method implementation, this kind of error
is just ignored and parameter is skipped. Now aria2 responds error for
these cases. The required parameter checking is also reworked along
with this change.
2011-09-25 23:36:00 +09:00
Tatsuhiro Tsujikawa
fee9b95db3
Don't check readability of BitTorrent TCP socket.
...
Don't check readability of BitTorrent TCP socket to avoid flooding.
2011-09-11 00:54:33 +09:00
Tatsuhiro Tsujikawa
79c59dcbf4
Cleanup log message for binding server socket.
...
Cleaned up log message for binding server socket. After binding
BitTorrent TCP port, add the socket to DownloadEngine to check
readability. This was missing for long time.
2011-09-11 00:13:09 +09:00
Tatsuhiro Tsujikawa
b775b19366
Check socket is null or not before calling (add|delete)SocketForReadCheck.
2011-09-11 00:12:18 +09:00
Tatsuhiro Tsujikawa
c408dbba72
Recognize tab as white space before option in -i list.
2011-08-28 00:40:23 +09:00
Tatsuhiro Tsujikawa
f25c89b53d
Added usage of --stream-piece-selector=geom option.
2011-08-25 00:04:04 +09:00
Tatsuhiro Tsujikawa
c7ac147287
Added PieceStorage::onDownloadIncomplete() virtual function.
...
In DefaultPieceStorage::onDownloadIncomplete(), we call
StreamPieceSelector::onBitfieldInit().
Added GeomStreamPieceSelectorTest.
2011-08-24 23:16:06 +09:00
Tatsuhiro Tsujikawa
b94bf3355b
getGeomMissingUnusedIndex: use index if isBitSet() is false.
...
In getGeomMissingUnusedIndex(), use index if isBitSet() is false
instead of finding isUseBitSet() == true and cancel. Added doc for
getGeomMissingUnusedIndex(). Renamed confusing names in bitfield.h.
2011-08-24 22:59:00 +09:00
Tatsuhiro Tsujikawa
a081f651a1
GeomStreamPieceSelector: Made base changeable and added offsetIndex
...
parameter.
2011-08-24 21:56:55 +09:00
Tatsuhiro Tsujikawa
7318c361bc
Added geom parameter to --stream-piece-selector option.
2011-08-24 21:56:54 +09:00
Tatsuhiro Tsujikawa
201af99501
Added GeomStreamPieceSelector.
2011-08-24 21:56:54 +09:00
Tatsuhiro Tsujikawa
846b9b9283
Detect \b as \f as valid UTF-8 chars.
2011-08-24 21:55:32 +09:00
Tatsuhiro Tsujikawa
09ce8960fd
Added completedLength response key in aria2.getFiles RPC method.
2011-08-23 18:47:27 +09:00
Tatsuhiro Tsujikawa
91220f20ca
Added #checksum help tag.
2011-08-23 17:59:38 +09:00
Tatsuhiro Tsujikawa
b7b5fac13c
Updated usage of -V option.
2011-08-23 17:55:22 +09:00
Tatsuhiro Tsujikawa
401a217369
Added --checksum option.
...
Added --checksum=TYPE=DIGEST option. This option sets checksum. TYPE
is hash type. The supported hash type is listed in "Hash Algorithms"
in "aria2c -v". DIGEST is hex digest. For example, setting sha-1
digest looks like this: sha-1=0192ba11326fe2298c8cb4de616f4d4140213838
This option applies only to HTTP(S)/FTP downloads.
2011-08-23 17:25:15 +09:00
Tatsuhiro Tsujikawa
8ec6cd1c44
Removed redundant MessageDigest::supports() call.
...
MessageDigest::supports() will be called from
MessageDigest::isValidHash() later in the function.
2011-08-23 17:23:46 +09:00
Tatsuhiro Tsujikawa
6c5c796646
Added --hash-check-only opiton.
...
Added --hash-check-only opiton. If true is given, after hash check
using --check-integrity option, abort download whether or not download
is complete. The default value is false.
2011-08-22 23:34:17 +09:00
Tatsuhiro Tsujikawa
f7aeb86ccc
Added --download-result option.
...
Added --download-result=OPT option. This option changes the way
"Download Results" is formatted. If OPT is 'default', print GID,
status, average download speed and path/URI. If multiple files are
involved, path/URI of first requested file is printed and remaining
ones are omitted. If OPT is 'full', print GID, status, average
download speed, percentage of progress and path/URI. The percentage of
progress and path/URI are printed for each requested file in each row.
2011-08-22 23:05:06 +09:00
Tatsuhiro Tsujikawa
3c73b6e767
Eliminated inet_ntoa and inet_ntop. Use getnameinfo() instead.
2011-08-20 21:53:48 +09:00
Tatsuhiro Tsujikawa
af46293ef9
Use utimes instead of utime if utimes is available.
2011-08-19 22:35:15 +09:00
Tatsuhiro Tsujikawa
3fe4e84443
Removed unused preferences.
2011-08-19 22:11:38 +09:00
Tatsuhiro Tsujikawa
384ef111b9
Added --rpc-allow-origin-all option.
...
This option adds Access-Control-Allow-Origin header field with value
'*' to the RPC response.
2011-08-18 21:24:18 +09:00
Tatsuhiro Tsujikawa
4c1c38a33f
Ignore --out option supplied in command-line if -i is used.
...
You can still use out option in the text file specified in -i.
2011-08-18 18:36:17 +09:00
Tatsuhiro Tsujikawa
bf42505b7b
MinGW32: Use CryptGenRandom() to generate random number.
...
MinGW32 lacks random(), so we use CryptGenRandom() as a replacement.
In the implementation, SimpleRandomizer::getRandomNumber() returns the
random number in range [0, INT32_MAX]. Thus,
simpleRandomizer::getMaxRandomNumber() returns INT32_MAX.
2011-08-18 18:03:06 +09:00
Tatsuhiro Tsujikawa
dce0667c0b
MinGW32 build: Replace all '\' in path with '/' in util::applyDir()
...
In MinGW32 build, replace all '\' in path with '/' in
util::applyDir(). Take into account '\' in File::getBasename() and
File::getDirname().
2011-08-18 17:27:41 +09:00
Cristian Rodríguez
e6f3c78103
- Disable SSLv2 and enable all workarounds for buggy servers
...
- Keep memory usage low when openSSL supports SSL_MODE_RELEASE_BUFFERS
2011-08-15 17:55:58 -03:00
Tatsuhiro Tsujikawa
fd3e7671a5
Use random() instead of rand().
2011-08-11 02:34:04 +09:00
Tatsuhiro Tsujikawa
e76dc28f7f
Added libnettle and libgmp support.
...
libnettle and libgmp is used by default. Old implementation uses
libgcrypt as default. If more and more Linux distributions offer
libnettle linked GnuTLS, then this change decrease library dependency
against libgcrypt and libgpg-error. The current library detection for
libnettle and libgmp is very simple, just use AC_SEARCH_LIBS.
util::generateRandomData() was written using SimpleRandomizer, thus no
external library dependency from this function.
2011-08-11 02:29:14 +09:00
Tatsuhiro Tsujikawa
11ac2c4a88
Added DHKeyExchange implementation using GMP.
2011-08-11 00:08:29 +09:00
Tatsuhiro Tsujikawa
6edfa4e430
Limit maximum length of ByteArrayWriter.
...
aria2 downloads meta files such as .torrent and .metalink file in
memory using ByteArrayWriter. To prevent accidentally download big
file, we set the maximum length that ByteArrayWriter can hold. The
default is 5MiB and it is reasonable because most .torrent and
.metalink file are much smaller than that.
2011-08-10 23:58:49 +09:00
Tatsuhiro Tsujikawa
2d9323651b
Don't use sorted std::deque for requestSlots_.
...
Don't use sorted deque for requestSlots_. For the most time, first
data requested is sent back first. So using std::deque, we find
received RequestSlot by O(1), while sorted std::deque requires
O(logN).
2011-08-10 23:18:23 +09:00
Tatsuhiro Tsujikawa
6ee913b0bc
Simplified PieceStatMan and RarestPieceSelector.
...
Simplified PieceStatMan and RarestPieceSelector, but computation order
to select piece index is still O(N) and unchanged. Updating piece
stat is improved to O(N) for bitfield update and O(1) for single
index update, while old implementation needs O(NlogN) and O(N)
respectively.
2011-08-10 21:29:01 +09:00
Tatsuhiro Tsujikawa
37016c6587
global cout and cerr is now retrieved using global::cout() and global::cerr()
...
This is necessary to avoid global variable initialization order
problem.
2011-08-10 01:28:20 +09:00
Tatsuhiro Tsujikawa
e8e3a6f259
wallclock is now retrieved using global::wallclock() call.
...
This is necessary to avoid global variable initialization order
problem.
2011-08-10 01:17:28 +09:00
Tatsuhiro Tsujikawa
97f34ab668
Added global::cerr. windows.h now included from common.h
...
We replaced most of std::cerr with global::cerr. windows.h is now
included from common.h. Before including it, we define WINVER. We
renamed some variable name because some macros in windows.h collide
with them.
2011-08-10 00:38:48 +09:00
Tatsuhiro Tsujikawa
a10cda2f17
Use global::cout to output string to stdout.
...
In MinGW32 build, global::cout is WinConsoleFile. When outputing to
console, it uses WriteConsoleW, so Unicode characters are written.
Fixed memory leak in WChar<->MultiByte conversion functions. The
portion of code which uses std::cout is rewritten to use global::cout.
2011-08-09 23:33:55 +09:00
Tatsuhiro Tsujikawa
02307cee0a
Removed utf8ToNative from log message and exception message.
2011-08-08 21:46:10 +09:00
Tatsuhiro Tsujikawa
7368c9c9d8
Percent-encode non-printable ASCII and non-ASCII chars in FileEntry.
...
Percent-encode non-printable ASCII and non-ASCII chars in URI using
util::percentEncodeMini() when URI is added to FileEntry. Removed
percent-encode from Request. Also do percent-encoding when setting
referer and redirected URI.
2011-08-07 20:46:04 +09:00
Tatsuhiro Tsujikawa
491e8bc519
Call utf8ToNative to log filename and URI in Metalink2RequestGroup.
2011-08-07 18:48:40 +09:00
Tatsuhiro Tsujikawa
e9d16306df
Made getRedirectURI and getTransferEncoding return const reference.
...
Made getRedirectURI and getTransferEncoding in HttpResponse return
const reference.
2011-08-07 18:45:29 +09:00
Tatsuhiro Tsujikawa
272d81b7a1
Rewritten ExpatMetalinkProcessor using BufferedFile.
2011-08-07 18:08:16 +09:00
Tatsuhiro Tsujikawa
32d413c6de
Use BufferedFile::printf in SessionSerializer
2011-08-07 17:30:21 +09:00
Tatsuhiro Tsujikawa
fd5f9127cd
Rewritten Logger using BufferedFile.
2011-08-07 17:06:07 +09:00
Tatsuhiro Tsujikawa
b6b8cb005d
Added printf and flush method to BufferedFile.
2011-08-07 17:05:50 +09:00
Tatsuhiro Tsujikawa
e2d682e0c6
bencode2::decodeFromFile is now first read torrent metainfo file into
...
memory before parsing it.
2011-08-07 01:43:24 +09:00
Tatsuhiro Tsujikawa
4220c2aadc
Read aria2.conf using BufferedFile
...
Read aria2.conf using BufferedFile. Added BufferedFile::transfer().
2011-08-07 01:43:02 +09:00
Tatsuhiro Tsujikawa
b3b67f440b
Removed unused function declaration.
2011-08-07 01:11:28 +09:00
Tatsuhiro Tsujikawa
0f349773f5
Rewritten saveAs using BufferedFile
2011-08-07 01:10:17 +09:00
Tatsuhiro Tsujikawa
a6c2ad53bf
Rewritten UriListParser using BufferedFile
2011-08-07 01:05:02 +09:00
Tatsuhiro Tsujikawa
945012a32f
Removed unused header
2011-08-07 00:37:54 +09:00
Tatsuhiro Tsujikawa
1f710d29c1
Rewritten SessionSerializer using BufferedFile
2011-08-07 00:36:44 +09:00
Tatsuhiro Tsujikawa
6034474550
Don't allow copying BufferedFile
2011-08-07 00:36:31 +09:00
Tatsuhiro Tsujikawa
190d170076
Rewritten ServerStatMan using BufferedFile.
2011-08-07 00:10:53 +09:00
Tatsuhiro Tsujikawa
7f3d027b83
Removed feof from operator unspecified_bool_type. Added eof().
...
In BufferedFile, removed feof from operator unspecified_bool_type. EOF
can be queried separately using newly added eof().
2011-08-07 00:06:32 +09:00
Tatsuhiro Tsujikawa
f6472abae8
Compare 16bytes of header text.
2011-08-06 23:04:06 +09:00
Tatsuhiro Tsujikawa
8f93855bbd
Rewritten ProtocolDetector using BufferedFile
2011-08-06 22:43:24 +09:00
Tatsuhiro Tsujikawa
c553d92f45
Rewritten NsCookieParser using BufferedFile
2011-08-06 21:59:06 +09:00
Tatsuhiro Tsujikawa
f38c2d2012
Rewritten Netrc using BufferedFile.
2011-08-06 21:57:38 +09:00
Tatsuhiro Tsujikawa
c9f8cf75bf
Rewritten CookieStorage using BufferedFile
2011-08-06 21:53:59 +09:00
Tatsuhiro Tsujikawa
410d88710b
Rewritten DHTRoutingTable I/O using BufferedFile.
2011-08-06 21:35:39 +09:00
Tatsuhiro Tsujikawa
ef27370243
Use BufferedFile in DefaultBtProgressInfoFile
2011-08-06 21:27:17 +09:00
Tatsuhiro Tsujikawa
6cb91cae88
Added fopen/fread/fwrite/fgets wrapper class.
2011-08-06 21:17:36 +09:00
Tatsuhiro Tsujikawa
733ff2c05a
Rewritten NsCookieParser using stdio instead of stream.
2011-08-05 23:35:00 +09:00
Tatsuhiro Tsujikawa
07874696c5
Rewritten Netrc using stdio instead of stream.
2011-08-05 23:33:30 +09:00
Tatsuhiro Tsujikawa
13158de0d3
Removed unused header fstream from DHTSetup
2011-08-05 22:45:34 +09:00
Tatsuhiro Tsujikawa
168094560d
Rewritten CookieStorage using stdio instead of stream
2011-08-05 22:44:54 +09:00
Tatsuhiro Tsujikawa
292bbb3679
Added log messages to DHTRoutingTable IO routines.
2011-08-05 22:23:53 +09:00
Tatsuhiro Tsujikawa
dea7a7969c
Rewritten DHTRoutingTableSerializer using stdio instead of stream.
2011-08-05 22:15:55 +09:00
Tatsuhiro Tsujikawa
f141cd4228
Rewritten DHTRoutingTableDeserializer using stdio instead of stream.
2011-08-05 21:50:11 +09:00
Tatsuhiro Tsujikawa
5eb338ad87
Rewritten DefaultBtProgressInfoFile using stdio instead of stream.
2011-08-05 18:34:07 +09:00
Tatsuhiro Tsujikawa
3879da592d
In MinGW32, open file with UNICODE filename and print them in ANSI.
2011-08-04 21:43:02 +09:00
Tatsuhiro Tsujikawa
6e1e481be5
Make --metalink-location option available with --disable-metalink
2011-07-31 21:46:07 +09:00
Tatsuhiro Tsujikawa
afdbda8f10
Initialize libgcrypt.
...
We relied initialization of libgcrypt on gnutls_global_init(), but
recent change in gnutls, which changes default crypto backend from
libgcrypt to libnettle, leaves libgcrypt uninitialized if it uses
libnettle as backend(and this is likely because libnettle is chosen by
default). To fix this issue, we simply initialize libgcrypt on our
own.
2011-07-30 17:36:39 +09:00
Tatsuhiro Tsujikawa
70eeebfae9
Retry DHT get_peers task if the number of peers in PeerStorage is less
...
than max peers.
Added virtual size_t countPeer() const to PeerStorage.
2011-07-29 23:49:25 +09:00
Tatsuhiro Tsujikawa
aa13ff5f51
Throw exception with error message if gnutls_global_init() failed.
2011-07-29 22:06:02 +09:00
Tatsuhiro Tsujikawa
932c258755
Added log message when checksum validation failed.
2011-07-28 00:00:01 +09:00
Tatsuhiro Tsujikawa
4ea28cb837
Don't send basic auth header to service operated on differenct port.
...
When --http-auth-challenge=true, aria2 only sends basic auth header
when requested. Old implementation sends basic auth header to service
operated in different port in successive request. This change avoid
this bug.
2011-07-27 23:28:31 +09:00
Tatsuhiro Tsujikawa
02292feaba
Consistent naming scheme for hash type and digest for Piece.
2011-07-27 22:50:10 +09:00
Tatsuhiro Tsujikawa
03f0774482
Consistent naming scheme for hash type and digest for DownloadContext.
2011-07-27 22:44:30 +09:00
Tatsuhiro Tsujikawa
7b86b294c9
Consistent naming scheme for hash type and digest.
2011-07-27 21:44:54 +09:00
Tatsuhiro Tsujikawa
ce101f5ad2
Use HttpHeader::getIterator() instead of HttpHeader::get()
2011-07-27 21:15:54 +09:00
Tatsuhiro Tsujikawa
c536e460aa
Merge branch 'rfc6249'
2011-07-27 21:02:53 +09:00
Tatsuhiro Tsujikawa
a533437be6
Implemented Metalink/HTTP in HTTP download.
...
Link header fields from first Metalink server is utilized as described
in rfc6249. We only set digest from Digest header field to
DownloadContext only when PieceStorage is not initialized(in other
words, before file size is known). After PieceStorage is initialized,
Digest header field is used to check the value is the same in digest
in DownloadContext. Current implementation only handles
rel=duplicate.
2011-07-27 20:54:21 +09:00
Tatsuhiro Tsujikawa
67e91c3431
HttpResponse::getDigest() now returns all Digest.
...
In addition, HttpResponse::getMetalinkHttpEntries() does not check
validity of URI. It is checked when we add it to FileEntry.
2011-07-27 19:32:35 +09:00
Tatsuhiro Tsujikawa
7c317de4e7
Added Metalink/HTTP Link and Digest header field parser.
2011-07-26 23:41:21 +09:00
Tatsuhiro Tsujikawa
9ff60ac477
Added struct for Metalink/HTTP
2011-07-26 23:19:54 +09:00
Tatsuhiro Tsujikawa
3b9a751757
Lowcase PREF_METALINK_LOCATION before split.
2011-07-25 23:58:38 +09:00
Tatsuhiro Tsujikawa
5a4a627d72
Remove Metalink content-type after first server response.
...
We don't accept Metalink content-type after first server response.
2011-07-25 00:03:13 +09:00
Tatsuhiro Tsujikawa
a6b7ef5f07
Eliminated static variable from LpdReceiveMessageCommand.
...
BtRegistry now holds LpdMessageReceiver.
2011-07-22 00:41:45 +09:00
Tatsuhiro Tsujikawa
97f76b7cf4
Fixed the bug due to dangling pointers in RequestGroup.
...
RequestGroup holds a poitner to btRuntime_ and peerStorage_. After
removing them from BtRegistry, we failed to set 0 to them. When
program access them, it goes undefined world, such as random crash.
We found this bug when pasuing download and valgrind warned memory
corruption.
2011-07-21 23:59:44 +09:00
Tatsuhiro Tsujikawa
c58f736bb9
BtRegistry now holds BitTorrent TCP server port.
...
Because BitTorrent TCP server port is global configuration, it is not
preferable that per download resource BtRuntime holds it. We also
refactored and eliminated ugly static variable in PeerListenCommand.
If TCP port is necessary, we inject it to them directly.
2011-07-21 23:42:41 +09:00
Tatsuhiro Tsujikawa
f0cd83f809
Added log message to clarify error for BitTorrent server socket.
2011-07-21 21:59:26 +09:00
Tatsuhiro Tsujikawa
e15f4edf8b
Loosen the condition where maxOutstandingRequest_ is increased.
2011-07-18 23:31:25 +09:00
Tatsuhiro Tsujikawa
a454a97c4e
Set UB_MAX_OUTSTANDING_REQUEST 256
2011-07-16 16:19:38 +09:00
Tatsuhiro Tsujikawa
af0daa3caa
Set NO_DEFAULT_VALUE as the default value of --enable-direct-io.
2011-07-16 16:15:16 +09:00
Tatsuhiro Tsujikawa
0eda667605
Added #deprecated help tag.
2011-07-16 16:14:57 +09:00
Tatsuhiro Tsujikawa
4933428261
Removed ENABLE_DIRECT_IO macro.
2011-07-16 16:06:15 +09:00
Tatsuhiro Tsujikawa
dbf4f553ca
Deprecated --enable-direct-io option.
...
Modified DeprecatedOptionHandler so that it can have replacing
OptionHandler.
2011-07-16 16:03:28 +09:00
Tatsuhiro Tsujikawa
b96df117d6
Removed deprecated options.
...
Removed --enable-xml-rpc, --xml-rpc-listen-all, --xml-rpc-listen-port,
--xml-rpc-max-request-size, --xml-rpc-user, --xml-rpc-passwd.
2011-07-16 15:52:35 +09:00
Tatsuhiro Tsujikawa
5bbfa742fc
Removed use of O_DIRECT because it performs bad.
2011-07-16 13:57:31 +09:00
Tatsuhiro Tsujikawa
5c4a52ad74
Managed user cuid in Piece.
...
Previous implementation does not store information which Command cuid
uses which Piece. Mark Piece acquired by SegmentMan by setting
Piece::setUsedBySegment(true).
2011-07-16 00:58:41 +09:00
Tatsuhiro Tsujikawa
ba710a7cb4
Define SHUT_WR as SD_SEND for MinGW32
2011-07-16 00:58:13 +09:00
Tatsuhiro Tsujikawa
ad4065ca12
Increased max # of in-flight request in BitTorrent.
2011-07-16 00:24:29 +09:00
Tatsuhiro Tsujikawa
44c379eaa8
Do nothing if block has already acquired.
...
This happens in end-game mode.
2011-07-16 00:23:45 +09:00
Tatsuhiro Tsujikawa
5703835784
Use GNUTLS_SHUT_WR instead of GNUTLS_SHUT_RDWR
...
We don't read the response from peer about this.
2011-07-06 22:52:15 +09:00
Tatsuhiro Tsujikawa
6f602e2809
Call shutdown() with SHUT_WR before close to avoid TCP RST.
2011-07-06 22:51:20 +09:00
Tatsuhiro Tsujikawa
d2e76eca47
Don't search faster server using ServerStatMan if req_ is null or
...
total length is unknown.
2011-06-29 21:30:32 +09:00
Tatsuhiro Tsujikawa
45430983d8
Move URI to spendUris_ when it is selected in
...
FileEntry::findFasterRequest().
2011-06-28 22:38:31 +09:00
Tatsuhiro Tsujikawa
bd4d3a27b3
Assign global::wallclock instead of calling Timer::reset().
2011-06-28 22:30:40 +09:00
Tatsuhiro Tsujikawa
5d498cb1ab
Take into account PREF_MAX_CONNECTION_PER_SERVER in
...
findFasterRequest(...,serverStatMan).
2011-06-28 21:27:31 +09:00
Tatsuhiro Tsujikawa
2906484345
Use ServerStat to find faster server.
2011-06-28 00:21:29 +09:00
Tatsuhiro Tsujikawa
0f0d4b9a48
Documented that falloc can be used against NTFS(MinGW build only).
2011-06-20 23:28:19 +09:00
Tatsuhiro Tsujikawa
cc7bc0aad3
Added aria2.getGlobalStat RPC method.
...
It returns overall download/upload speed and the number of
active/stopped/waiting downloads.
2011-06-17 22:45:42 +09:00
Tatsuhiro Tsujikawa
bb7e2e69db
Call requestQueueCheck() even if reservedGroups_ is not empty.
2011-06-16 22:36:20 +09:00
Tatsuhiro Tsujikawa
58b9655ad4
Call requestQueueCheck() even if reservedGroups_ is not empty.
...
This is because if all downloads in reservedGroups_ are in paused
state, we have to call requestQueueCheck() for each new added
download.
2011-06-16 22:01:14 +09:00
Tatsuhiro Tsujikawa
bea21e0afa
Added --stream-piece-selector option to -i list option.
2011-06-16 21:45:47 +09:00
Tatsuhiro Tsujikawa
d5c2ef4ce9
Added --pause option.
...
This option pauses download after added. This option is effective only
when --enable-rpc=true is given. When --save-session option is used
and there are paused downloads, they are saved with --pause=true so
that it will become paused state when the session is recovered.
2011-06-16 21:37:15 +09:00
Tatsuhiro Tsujikawa
c0d1e98133
Abort aria2 if it could not setup any RPC server.
2011-06-15 22:19:09 +09:00
Tatsuhiro Tsujikawa
561dafc942
Added --truncate-console-readout option.
...
This option truncates console readout to fit in a single line. This
is default. Give false value to this option to tell aria2 not to
truncate console readout.
2011-06-15 20:27:14 +09:00
Tatsuhiro Tsujikawa
e3e7a420de
Cache and reuse RpcMethod objects.
2011-06-15 20:07:10 +09:00
Tatsuhiro Tsujikawa
d1885a5874
Allowed missing params in system.multicall RPC method.
2011-06-15 00:42:50 +09:00
Tatsuhiro Tsujikawa
2d92571cf9
Moved jsonRpc flag from RpcMethod to RpcRequest.
...
Now RpcMethod is stateless, so we can cache and reuse them.
2011-06-15 00:19:07 +09:00
Tatsuhiro Tsujikawa
ba9673be1d
Initialized member variables of DownloadResult in its ctor.
2011-06-12 00:51:36 +09:00
Tatsuhiro Tsujikawa
65ec9e98df
Replaced InOrder with Inorder.
2011-06-11 21:49:09 +09:00
Tatsuhiro Tsujikawa
deaea9537b
Added --stream-piece-selector option.
...
This option specifies piece selection algorithm used in HTTP/FTP
download. Piece means fixed length segment which is downloaded in
parallel in segmented download. If 'default' is given, aria2 selects
piece so that it reduces the number of establishing connection. This
is reasonable default behaviour because establishing connection is an
expensive operation. If 'inorder' is given, aria2 selects piece which
has minimum index. Index=0 means first of the file. This will be
useful to view movie while downloading it. --enable-http-pipelining
option may be useful to reduce reconnection overhead. Please note
that aria2 honors --min-split-size option, so it will be necessary to
specify a reasonable value to --min-split-size option.
2011-06-11 21:41:56 +09:00
Tatsuhiro Tsujikawa
cc82da3bab
Added StreamPieceSelector class.
...
This class abstracts the piece selection algorithm for HTTP/FTP
download.
2011-06-11 17:34:17 +09:00
Tatsuhiro Tsujikawa
533cdfa850
Removed unnecessary template parameter from std::make_pair call.
...
The patch was contributed from Dan Fandrich.
2011-06-10 21:11:03 +09:00
Tatsuhiro Tsujikawa
51dc544f2b
Logged invoked RPC method name.
2011-06-07 23:33:04 +09:00
Tatsuhiro Tsujikawa
e958f5dab3
Implemented fast file allocation in MinGW32 build.
...
We use SetFilePointerEx and SetEndOfFile to allocate extents. This
only works with NTFS. To enable this feature, --file-allocation=falloc
must be given.
2011-06-07 01:09:38 +09:00
Tatsuhiro Tsujikawa
867cab6df1
Small code cleanup
2011-06-01 01:43:31 +09:00
Tatsuhiro Tsujikawa
2799c9f0cc
Only percent-encode non-printable ASCII chars(0x00-0x1f), non-ASCII
...
chars(>0x7f), ' ', '"', '<' and '>' for URIs supplied by user and
remote server(usually Location header field).
2011-06-01 01:34:30 +09:00
Tatsuhiro Tsujikawa
74a049ddfc
Don't throw exception if Z_BUF_ERROR is encountered in
...
GZipDecodingFilter.
2011-05-30 23:10:06 +09:00
Tatsuhiro Tsujikawa
34207cda01
Don't throw exception if Z_BUF_ERROR is encountered in GZipEncoder.
2011-05-30 23:04:48 +09:00
Tatsuhiro Tsujikawa
70b7394b21
Updated doc for --save-session option.
2011-05-29 21:07:27 +09:00
Tatsuhiro Tsujikawa
4784114281
Don't save removed download in --save-session text file.
...
Now stat column of removed downloads in Download Results is 'RM'
instead of INPR.
2011-05-29 20:59:45 +09:00
Tatsuhiro Tsujikawa
c6b71eac8f
Updated doc for --save-session option.
2011-05-19 19:01:17 +09:00
Tatsuhiro Tsujikawa
4dc71647f8
Added --metalink-base-uri option to -i list options.
2011-05-16 22:45:53 +09:00
Tatsuhiro Tsujikawa
653f04ef5c
Add CreateRequestCommand with STATUS_INACTIVE instead of SleepCommand
...
+ DownloadFailureException.
Throwing DownloadFailureException may stop download unexpectedly when
--reuse-uri is false. Using CreateRequestCommand with STATUS_INACTIVE,
they can be executed next iteration with
DownloadEngine::setRefreshInterval(0).
2011-05-16 22:01:49 +09:00
Tatsuhiro Tsujikawa
c9fe4c64f5
Added relative URI support to ExpatMetalinkProcessor
2011-05-16 01:37:19 +09:00
Tatsuhiro Tsujikawa
49b49c351a
Eliminated few seconds delay when downloads stop or pause.
...
The delay is caused because some Commands are only called in certain
interval(called refreshInterval, default, 1000ms). In aria2 download
stops when all Commands associated to it are stopped. Since some
Commands are called in each 1000ms by default, as mentioned before, we
have to wait for them. To fix this issue, we call
DownloadEngine::setRefreshInterval(0) when pausing/stopping downloads.
DownloadEngine::setRefreshInterval(0) makes refreshInterval 0 in one
shot.
When all segments are ignored, now DownloadFailureException is thrown.
And stop the download immediately. As described earlier, we call
DownloadEngine::setRefreshInterval(0) in catch block of
DownloadFailureException to eliminate delay.
2011-05-15 23:35:06 +09:00
Tatsuhiro Tsujikawa
49b032800f
Added --metalink-base-uri option.
...
--metalink-uri option specifies base URI to resolve relative URI in
metalink file stored in local disk. If URI points to a directory, URI
must end with '/'.
2011-05-14 22:52:54 +09:00
Tatsuhiro Tsujikawa
ed589ab034
Run batch file with cmd.exe. Quoted user command.
...
It seems that we have to specify the full path to cmd.exe in the first
argument of CreateProcess() to run batch file in proper manner. We
first determine the full path to cmd.exe. To do this, we get windir
environment variable and concatenate it with "\system32\cmd.exe".
2011-05-14 21:27:31 +09:00
Tatsuhiro Tsujikawa
286991e17d
Strip DQUOTE from cookie-value and updated doc.
2011-05-14 21:24:10 +09:00
Tatsuhiro Tsujikawa
3026b18ecd
Updated doc
2011-05-14 21:23:59 +09:00
Tatsuhiro Tsujikawa
00fa59d0f5
Fixed the bug that the message "Loaded cookies from ..." appears when
...
loading cookies from that file failed.
2011-05-12 09:39:03 +09:00
Tatsuhiro Tsujikawa
990a9e6d8e
Applied patch from Dan Fandrich.
...
Thanks to Dan Fandrich.
I modified some lines to suite my taste.
2011-05-07 18:48:58 +09:00
Tatsuhiro Tsujikawa
ad5af56c17
Support relative URI in Metalink file.
...
If relative URI is found in Metalink file, aria2 resolves its full URI
contatenating the URI from which Metalink file is retrieved and
relative URI in Metalink file. This feature is not available if
Metalink file in local disk is specified in command line.
2011-05-07 18:41:18 +09:00
Tatsuhiro Tsujikawa
e7d7233d54
Moved joinUri from util namespace to uri namespace.
2011-05-06 23:20:43 +09:00
Tatsuhiro Tsujikawa
11d7e4fa46
Set DownloadEngine::setNoWait(true) in SleepCommand.
2011-04-30 23:45:17 +09:00
Tatsuhiro Tsujikawa
1122e55a35
Handle "..", "." in util::joinUri()
2011-04-30 22:42:10 +09:00
Tatsuhiro Tsujikawa
55d00d047c
Added swap for UriStruct
2011-04-30 00:29:14 +09:00
Tatsuhiro Tsujikawa
871819af59
Added util::joinUri()
2011-04-30 00:15:27 +09:00
Tatsuhiro Tsujikawa
33b9b3b27d
Added uri::construct()
2011-04-30 00:14:49 +09:00
Tatsuhiro Tsujikawa
2c0476e6d9
Erase user and password specified in command-line from argv.
...
The user and password is masked with '*'.
2011-04-22 23:38:59 +09:00
Tatsuhiro Tsujikawa
211c4ea9f4
If no data type tag is used in XML-RPC, treat the data as string.
2011-04-22 23:02:28 +09:00
Tatsuhiro Tsujikawa
aabb1f963e
Removed condition always evaluated to true.
2011-03-29 23:22:36 +09:00
Tatsuhiro Tsujikawa
891c9e60ac
Use A2_DELTA_MILLIS for timing critical code.
2011-03-27 20:54:51 +09:00
Tatsuhiro Tsujikawa
a4ddec44d1
Fixed typo
2011-03-27 19:19:33 +09:00
Tatsuhiro Tsujikawa
6e3f512c61
Added --show-console-readout option.
...
This option toggles appearance of console readout.
2011-03-27 19:16:54 +09:00
Tatsuhiro Tsujikawa
60a21e672c
Fixed compile error
2011-03-21 11:34:35 +09:00
Tatsuhiro Tsujikawa
87ca37ea48
Log error when event polling function failed.
2011-03-20 15:22:42 +09:00
Tatsuhiro Tsujikawa
e95b8efc6b
Fixed the bug that microsecond part of timeval overwlows in waitData().
2011-03-20 15:00:13 +09:00
Tatsuhiro Tsujikawa
d8585fd6eb
Updated doc
2011-03-18 22:45:25 +09:00
Tatsuhiro Tsujikawa
c1c3f2d77a
Return text/javascript as Content-Type if jsoncallback is given.
2011-03-18 22:43:01 +09:00
Tatsuhiro Tsujikawa
3d2fa5954e
Rewritten SocketBuffer::BufEntry and SocketBuffer::send()
2011-03-18 17:20:37 +09:00
Tatsuhiro Tsujikawa
18d51a3e20
Removed logging RPC request.
2011-03-17 16:09:22 +09:00
Tatsuhiro Tsujikawa
46eced8ada
Fixed compile error and unit test error without SSL library.
2011-03-17 16:08:39 +09:00
Tatsuhiro Tsujikawa
821dbbff1f
Fixed compile error with --disable-bittorrent
2011-03-17 16:02:35 +09:00
Tatsuhiro Tsujikawa
6e818a06dc
Replaced gid_t with a2_gid_t cause gid_t is commonly used as group ID.
2011-03-17 12:17:46 +09:00
Tatsuhiro Tsujikawa
b9a37f48cf
Updated doc.
2011-03-16 16:56:33 +09:00
Tatsuhiro Tsujikawa
73572712d8
Use .meta4 instead of .metalink as suffix when saving metalink XML
...
uploaded by RPC.
2011-03-16 16:55:38 +09:00
Tatsuhiro Tsujikawa
046bee87a2
Code cleanup
2011-03-16 12:56:03 +09:00
Tatsuhiro Tsujikawa
15730aa560
Fixed the bug that JSONP callback function name is not encoded
...
properly.
2011-03-16 12:55:12 +09:00
Tatsuhiro Tsujikawa
dfdf98d2f7
Fixed segmentation fault when JSON-RPC request cannot be parsed or is
...
invalid.
2011-03-16 12:53:40 +09:00
Tatsuhiro Tsujikawa
bb9ad97c5c
Allow empty params in GET request.
2011-03-16 12:50:39 +09:00
Tatsuhiro Tsujikawa
da0ab67324
Delegate jsonRpc_ to child method in system.multicall.
2011-03-16 00:29:39 +09:00
Tatsuhiro Tsujikawa
3ddb68f340
Deprecated --enable-xml-rpc and --xml-rpc-* option. Introduced
...
--enable-rpc and --rpc-* option instead.
--enable-xml-rpc and --xml-rpc-* option can be used but warning
message will be shown. The help tag #xml-rpc was replaced with #rpc.
2011-03-14 21:02:25 +09:00
Tatsuhiro Tsujikawa
f0cfbb21c1
Renamed classes in abstract layer of RPC service from XmlRpc* to Rpc*.
...
Now JSON-RPC is available by default regardless of XML library.
XML-RPC becomes available when XML library is available.
2011-03-14 16:38:54 +09:00
Tatsuhiro Tsujikawa
5a1fb3875f
Added XmlRpcResponseTest. Set null as id if id is not sent.
...
Removed unused XmlRpcResponse::toJsonBatch(). Set default value false
to gzip argument of xmlrpc::toJsonBatch().
2011-03-14 15:31:26 +09:00
Tatsuhiro Tsujikawa
bf01bb84b6
Added JSONP support. Callback query parameter is "jsoncallback".
2011-03-14 00:57:05 +09:00
Tatsuhiro Tsujikawa
feb4e2e53a
Hide operator<<(char c);
2011-03-14 00:54:14 +09:00
Tatsuhiro Tsujikawa
b46e7a953b
encodeJsonAll: Fixed stream error when gzip=true.
2011-03-14 00:53:16 +09:00
Tatsuhiro Tsujikawa
8a9fa9a692
Added JSON-RPC 2.0 batch call.
2011-03-10 00:56:37 +09:00
Tatsuhiro Tsujikawa
bc7ac15d7e
Fixed error message in json::decode()
2011-03-10 00:54:07 +09:00
Tatsuhiro Tsujikawa
7338a25035
Added initial JSON-RPC support.
...
JSON-RPC is enabled using --enable-xml-rpc. We are implementing
JSON-RPC based on JSON-RPC 2.0 draft spec.
2011-03-09 23:07:27 +09:00
Tatsuhiro Tsujikawa
d541b350d2
Set DEFAULT_REFRESH_INTERVAL 1000 to update console readout more
...
smoothly.
2011-02-26 23:16:48 +09:00
Tatsuhiro Tsujikawa
59f251ba14
Fixed rounding error in DownloadEngine::run().
...
This fixes the bug that executeCommand() with Command::STATUS_ALL is
not called in every interval correctly because of rounding error in
timer.
2011-02-25 22:58:51 +09:00
Tatsuhiro Tsujikawa
f8f651e8db
Refresh buckets at DHT initialization without checking serialized
...
time.
Checking serialized time does not work if you stop aria2 as soon as it
started DHT. The serialized time in dht.dat will be updated, but
buckets are not updated and still old. When you restart aria2 again,
it does not refresh buckets because serialized time is recent.
2011-02-25 22:39:14 +09:00
Tatsuhiro Tsujikawa
655b59e350
Retry get_peers if connection is low.
...
To eliminate unresponsive node, we have to contact them 5
times. Therefore the maximum number of retry is 10. It is very
annoying when it takes some time to get first peer, so retry quickly
(5 seconds delay).
2011-02-25 00:34:50 +09:00
Tatsuhiro Tsujikawa
f16aef227d
Fixed compile error with c-ares 1.7.0
2011-02-19 01:57:16 +09:00
Tatsuhiro Tsujikawa
b21cce0002
Use pkg-config for libcares. Dropped c-ares pre-1.5 support.
2011-02-18 23:36:39 +09:00
Tatsuhiro Tsujikawa
395212f47f
Replaced HAVE_LIBSSL with HAVE_OPENSSL
2011-02-18 22:43:50 +09:00
Tatsuhiro Tsujikawa
7230fbd2f7
Replaced HAVE_LIBZ with HAVE_ZLIB
2011-02-18 22:34:38 +09:00
Tatsuhiro Tsujikawa
3f125dce21
Use LIBS and CPPFLAGS instead of substituting them individually per
...
library.
2011-02-18 18:53:53 +09:00
Tatsuhiro Tsujikawa
d3d1293974
Check the availability of ares_set_servers and ares_addr_node.
2011-02-18 01:04:11 +09:00
Tatsuhiro Tsujikawa
1698b2c7b1
Save downloads added by aria2.addTorrent or aria2.addMetalink in
...
--save-session file.
Uploaded data are saved as file named hex string of sha1 hash of
uploaded data plus extension(".torrent" for torrent and ".metalink"
for metalink). For example,
0a3893293e27ac0490424c06de4d09242215f0a6.torrent. The directory where
these files are saved is specified by --dir option. These file paths
are written in --save-session file.
2011-02-16 00:44:23 +09:00
Tatsuhiro Tsujikawa
a21fb350a0
Fixed the bug that causes segmentation fault when unpause RequestGroup
...
which has resolved BtDependency.
2011-02-14 00:36:52 +09:00
Tatsuhiro Tsujikawa
eb6a811279
Look for USERPROFILE and the combination of HOMEDRIVE and HOMEPATH to
...
get user's home directory in MinGW32 build.
Usually HOME environment variable is defined in *nix like OSes, but
not in Windows. So in MinGW32 build, if HOME is not defined, we also
look for USERPROFILE and the combination of HOMEDRIVE and HOMEPATH.
2011-02-12 18:38:13 +09:00
Tatsuhiro Tsujikawa
22a6ec6a15
Fixed the bug that DownloadContext::basePath_ is not
...
escaped. Percent-encode non UTF-8 strings in torrent file and Magnet
URI.
2011-02-12 00:15:33 +09:00
Tatsuhiro Tsujikawa
1a9d3b7711
Added Date, Expires and Cache-Control response header field to XML-RPC response headers.
2011-02-09 23:01:01 +09:00
Tatsuhiro Tsujikawa
ffce1848ca
Don't retry peer lookup.
...
We can handle shortage of peer by short interval.
2011-02-08 23:39:44 +09:00
Tatsuhiro Tsujikawa
aa4232ca8b
Use rp instead of res.
2011-02-08 23:14:13 +09:00
Tatsuhiro Tsujikawa
297858280b
Moved PREF_ASYNC_DNS_SERVER to the next to PREF_ASYNC_DNS.
2011-02-08 23:08:44 +09:00
Tatsuhiro Tsujikawa
f0682a98c0
Added --async-dns-server option.
...
This option accepts comma separated list of DNS server address used in
asynchronous DNS resolver. Usually asynchronous DNS resolver reads DNS
server addresses from /etc/resolv.conf. When this option is used, it
uses DNS servers specified in this option instead of ones in
/etc/resolv.conf. You can specify both IPv4 and IPv6 address. This
option is useful when the system does not have /etc/resolv.conf and
user does not have the permission to create it.
2011-02-08 23:05:40 +09:00
Tatsuhiro Tsujikawa
cf546810e4
Don't call DownloadEngine::markBadIPAddress() when DNS query was timeout.
2011-02-08 22:46:22 +09:00
Tatsuhiro Tsujikawa
af4e47329b
Call calculateStatistics() after global::wallclock.reset().
...
Inside calculateStatistics(), global::wallclock is used and if
calculateStatistics() is called after waitData(), it may use quite old
global::wallclock value.
2011-02-08 00:16:29 +09:00
Tatsuhiro Tsujikawa
3574f6bd7d
Accept https:// and ftp:// in proxy options and environment variables.
2011-02-07 22:59:04 +09:00
Tatsuhiro Tsujikawa
954d595ee8
Code cleanup
2011-02-07 21:43:38 +09:00
Tatsuhiro Tsujikawa
97fde60f3e
Added upper limit of the number of peer added by each addPeer(vector) call.
2011-02-07 21:38:51 +09:00
Tatsuhiro Tsujikawa
656f8cf901
Don't calculate maxPeerListSize based on --bt-max-peers.
...
Always use MAX_PEER_LIST_SIZE by default.
2011-02-07 00:22:06 +09:00
Tatsuhiro Tsujikawa
6c44f6b8eb
Removed unused member variable peers_.
2011-02-07 00:19:07 +09:00
Tatsuhiro Tsujikawa
8eb1de9ef8
Get peers from DHT more frequently when the size of peer list is 0.
2011-02-07 00:17:44 +09:00
Tatsuhiro Tsujikawa
2666bc8170
Renamed MessageDigestHelper as message_digest_helper
...
Static member variables in MessageDigestHelper class are now functions
under message_digest namespace.
2011-02-05 23:38:51 +09:00
Tatsuhiro Tsujikawa
38202a5565
Renamed MetalinkHelper as metalink_helper.
...
Static member functions in MetalinkHelper class is now functions under
metalink namespace.
2011-02-05 23:21:06 +09:00
Tatsuhiro Tsujikawa
2373c62205
Moved some static member variables which are not exposed as public to unnamed namespace.
2011-02-05 23:08:03 +09:00
Tatsuhiro Tsujikawa
8902c2a839
Rewritten DefaultPeerStorage::addPeer(const std::vector<SharedHandle<Peer> >&)
2011-01-31 23:00:05 +09:00
Tatsuhiro Tsujikawa
27974108f0
Fixed overflow in the calculation of progress percentage for file
...
allocation and hash check when off_t is 32bit.
2011-01-30 23:28:10 +09:00
Tatsuhiro Tsujikawa
1b9329c67c
Accept HTTP 304 reply as success when If-None-Match request-header
...
field is specified using --header option.
When --conditional-get is used, --allow-overwrite is now required to
overwrite existing file.
2011-01-29 23:19:10 +09:00
Tatsuhiro Tsujikawa
2ba2511dd5
Check presence of ar.
...
This change allows configure to find appropriate ar at cross compile.
2011-01-29 21:33:57 +09:00
Tatsuhiro Tsujikawa
b49a558c4e
Fixed compile error on 32bit systems.
2011-01-27 21:21:37 +09:00
Tatsuhiro Tsujikawa
43dd3861a5
Updated copyright year.
2011-01-20 00:59:06 +09:00
Tatsuhiro Tsujikawa
fe40876546
Added aria2.removeDownloadResult XML-RPC method.
...
The method signature is aria2.removeDownloadResult(gid). This method
removes completed/error/removed download denoted by gid from
memory. This method returns "OK" for success.
2011-01-20 00:56:34 +09:00
Tatsuhiro Tsujikawa
1ea01e84b2
Use IP address of data connection to connect to the remote server in
...
passive mode.
2011-01-20 00:30:01 +09:00
Tatsuhiro Tsujikawa
1d71626bea
Supported multi-line HTTP header field value.
...
See http://tools.ietf.org/html/rfc2616#section-4.2
2011-01-20 00:25:01 +09:00
Tatsuhiro Tsujikawa
2873953f30
Changed the default value of --retry-wait to 0 for backward
...
compatibility.
Also updated usage doc.
2011-01-18 21:22:59 +09:00
Tatsuhiro Tsujikawa
426e57a180
Don't check permission of .netrc file in MinGW32 build.
2011-01-17 22:36:19 +09:00
Tatsuhiro Tsujikawa
b0ed9b3bd1
Added retry-wait option to -i list options.
2011-01-17 21:25:17 +09:00
Tatsuhiro Tsujikawa
f2a63fa06a
Added --retry-wait option.
...
This option was once existed in aria2 but erased on 2009-09-20. Now
it is resurrected once again. We choose 2 as default value, but there
is no good theory behind it. Now we retry HTTP download when remote
server returns 503 Service Unavailable if --retry-wait > 0. We also
added error code 29: HTTP_SERVICE_UNAVAILABLE.
2011-01-17 21:19:45 +09:00
Tatsuhiro Tsujikawa
4824b09237
Reverted comment which was removed unintentionally. Moved 2
...
DownloadEngine related lines outside of #ifdef ENABLE_MESSAGE_DIGEST.
2011-01-16 22:35:30 +09:00
Tatsuhiro Tsujikawa
90d94953d7
Don't show metadata download and paused download in "Download Results".
2011-01-16 22:20:29 +09:00
Tatsuhiro Tsujikawa
9fe35495fd
Fixed doc
2011-01-16 21:16:56 +09:00
Tatsuhiro Tsujikawa
2c3187451f
Don't pool connection if the command has multiple segments.
...
This means it did HTTP pipelined request. If this response is for the
first request, then successive response may arrived to the socket.
2011-01-16 21:05:14 +09:00
Tatsuhiro Tsujikawa
97d0b71dd4
Don't use SocketCore::isReadable() repeatedly.
...
We can know whether data is available by inspecting 2nd argument of
SocketCore::readData() because we use non-blocking I/O.
2011-01-16 21:04:31 +09:00
Tatsuhiro Tsujikawa
63fe7874da
Handle the situation when remote server returns Connection: close
...
after several pipelined requests.
We call Request::setMaxPipelinedRequest(1) if Connection: close is
received. Also call Request::supportsPersistentConnection(true) and
Request::setMaxPipelinedRequest(1) when closing the connection.
2011-01-16 18:12:14 +09:00
Tatsuhiro Tsujikawa
b2f27e6548
Check !SocketRecvBuffer::bufferEmpty() in ctor.
...
Also treat !SocketRecvBuffer::bufferEmpty() as data is available.
2011-01-16 17:52:18 +09:00
Tatsuhiro Tsujikawa
e60181d1ad
Removed SocketCore::peekData()
2011-01-16 17:41:17 +09:00
Tatsuhiro Tsujikawa
629099d40d
Eliminated SocketCore::peekData() from HttpServer.
2011-01-16 17:27:01 +09:00
Tatsuhiro Tsujikawa
d030dd5a3f
Code cleanup
2011-01-16 17:26:46 +09:00
Tatsuhiro Tsujikawa
ea1b4b3ee5
Eliminated SocketCore::peekData() form HTTP/FTP downloads.
...
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.
2011-01-16 16:55:41 +09:00
Tatsuhiro Tsujikawa
3e67079087
Rewritten NAT check handling.
...
We simplified PeerConnection::receiveHandshake().
DefaultBtMessageReceiver and PeerReceiverHandshakeCommand look
PeerConnection's buffer and do NAT check handling themselves.
2011-01-09 23:57:07 +09:00
Tatsuhiro Tsujikawa
1818f2ed55
Just preset IA to PeerConnection in receiver side.
...
Since initiator cannot send payload stream before reading step2 from
receiver, mseHandshake_->getBufferLength() should be 0.
2011-01-09 18:34:06 +09:00
Tatsuhiro Tsujikawa
320ca4c5a1
Throw exception if more than BtHandshakeMessage::MESSAGE_LENGTH is
...
buffered when receiving handshake. Detect preset buffer without
setting prevPeek_ = true.
2011-01-09 18:34:06 +09:00
Tatsuhiro Tsujikawa
e5c27034f3
Added assertion in shiftBuffer to check size.
2011-01-09 18:34:06 +09:00
Tatsuhiro Tsujikawa
02ca3ed0b7
Use refreshInterval_ as timeout value of event polling.
...
refreshInterval_ is now limited less than 1000ms.
2011-01-09 18:34:06 +09:00
Tatsuhiro Tsujikawa
781a4220fc
Bump up DHT version number to 3.
2011-01-09 18:34:06 +09:00
Tatsuhiro Tsujikawa
a2a91a2c74
Shorten MAX_BUFFER_LENGTH of MSEHandshake.
2011-01-09 18:34:06 +09:00
Tatsuhiro Tsujikawa
2ee68ec8ad
Drop connection if IA length > 68 (BtHandshakeMessage::MESSAGE_LENGTH).
2011-01-09 18:34:06 +09:00
Tatsuhiro Tsujikawa
acfb290eca
We don't need to call PeerConnection::sendPendingData() twice when
...
sending piece message.
2011-01-09 18:34:06 +09:00