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