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
995c07c184
Fixed base64::decode() return "" if input ends with garbase and no padding
2012-07-04 22:51:41 +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
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
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
5fc1b1ad29
Rewritten HTTP header parser
2012-06-23 17:34:20 +09:00
Tatsuhiro Tsujikawa
9ba65aea1d
Rewritten ChunkedDecodingStreamFilter
2012-06-18 23:42:46 +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
7785ea8c4b
Code cleanup
2012-05-16 23:28:19 +09:00
Tatsuhiro Tsujikawa
0e5ae22f73
Fixed memory leak
2012-05-16 23:28:07 +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
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
1e0068e4d4
WebSocket: Check keyword string in comma separeted values in HTTP
...
header field.
2012-04-08 19:00:07 +09:00
Tatsuhiro Tsujikawa
d9bb24a2e0
Fixed gcc-4.7 warnings
2012-04-08 03:12:29 +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
0a9abd89c6
Rewritten TLS hostname check based on RFC 6125.
2012-03-30 23:49:14 +09:00
Tatsuhiro Tsujikawa
25ef6677e9
Added hostname check described in RFC 2818 with OpenSSL.
2012-03-28 23:28:22 +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
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
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
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
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
a6803c21b5
Support network-path reference in HTTP redirect.
2012-01-11 02:17:38 +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
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
3637291c22
Fixed compile warning/error with mingw32
2011-12-10 19:06:09 +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
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
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
dd8824ab11
Don't compare c-strng using CPPUNIT_ASSERT_EQUAL
2011-12-02 00:30:11 +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
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
db5cc4db27
Don't append character to std::string.
2011-11-12 21:27:24 +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
2f4393d17c
Rewritten parse*Int
2011-11-12 01:06:52 +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
aa6f9c2057
Removed unused code
2011-11-08 23:13:47 +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
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
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
d1d4903665
Rewritten bencode2::decode functions
2011-11-05 12:01:57 +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
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
f884ad8339
Rewritten parseIndexPath. Renamed createIndexPathMap as createIndexPaths.
2011-11-02 00:18:39 +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
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
84b19f154a
Deprecated --metalink-server option. Use --split option instead.
2011-10-30 21:36:36 +09:00
Tatsuhiro Tsujikawa
4a455b5afe
Removed IntSequence and Sequence<T>
2011-10-30 15:08:44 +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
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
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
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
62a07fff5f
Fixed unit test
2011-10-25 00:05:28 +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
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
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
4747d003f7
Added test for inetNtop()
2011-10-18 22:57:59 +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
310e58bc62
Stored hash value as raw byte string, instead of hex digest.
2011-10-13 21:40:07 +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
c408dbba72
Recognize tab as white space before option in -i list.
2011-08-28 00:40:23 +09:00
Tatsuhiro Tsujikawa
a743bef220
Fixed output file path of tests.
2011-08-25 00:26:36 +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
a081f651a1
GeomStreamPieceSelector: Made base changeable and added offsetIndex
...
parameter.
2011-08-24 21:56:55 +09:00
Tatsuhiro Tsujikawa
201af99501
Added GeomStreamPieceSelector.
2011-08-24 21:56:54 +09:00
Tatsuhiro Tsujikawa
0f72cbab8a
JsonTest: Added test case for decoding escaped chars
2011-08-24 21:55:54 +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
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
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
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
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
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
a6c2ad53bf
Rewritten UriListParser using BufferedFile
2011-08-07 01:05:02 +09:00
Tatsuhiro Tsujikawa
1f710d29c1
Rewritten SessionSerializer using BufferedFile
2011-08-07 00:36:44 +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
6cb91cae88
Added fopen/fread/fwrite/fgets wrapper class.
2011-08-06 21:17:36 +09:00
Tatsuhiro Tsujikawa
168094560d
Rewritten CookieStorage using stdio instead of stream
2011-08-05 22:44:54 +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
3879da592d
In MinGW32, open file with UNICODE filename and print them in ANSI.
2011-08-04 21:43:02 +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
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
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
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
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
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
d1885a5874
Allowed missing params in system.multicall RPC method.
2011-06-15 00:42:50 +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
595a514b17
Fixed typo
2011-06-11 18:03:33 +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
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
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
0f9b59cdce
Fixed compile error with g++-4.6.1
2011-05-21 00:04:25 +09:00
Tatsuhiro Tsujikawa
5cef1cb15c
Added missing base_uri.xml to EXTRA_DIST
2011-05-16 23:28:33 +09:00
Tatsuhiro Tsujikawa
286991e17d
Strip DQUOTE from cookie-value and updated doc.
2011-05-14 21:24:10 +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
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
3941c72219
Added test for OptionParser::getEraseAfterParse()
2011-04-22 23:45:30 +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
46eced8ada
Fixed compile error and unit test error without SSL library.
2011-03-17 16:08:39 +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
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
15730aa560
Fixed the bug that JSONP callback function name is not encoded
...
properly.
2011-03-16 12:55:12 +09:00
Tatsuhiro Tsujikawa
f999c2bcae
Added test for JSON-RPC GET request without params parameter.
2011-03-16 12:51:43 +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
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
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
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
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
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
8902c2a839
Rewritten DefaultPeerStorage::addPeer(const std::vector<SharedHandle<Peer> >&)
2011-01-31 23:00:05 +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
7a6ec762ef
Added cast to time_t.
2011-01-29 21:36:00 +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
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
ce2d401dce
Eliminated SocketCore::peekData from MSEHandshake.
2011-01-09 18:34:06 +09:00
Tatsuhiro Tsujikawa
920583502e
Consider IP address and port when finding DHT node.
2011-01-07 00:14:42 +09:00
Tatsuhiro Tsujikawa
d429943d05
Fixed the bug that peer is marked as seeder whenever it sends
...
extension handshake with metadata size.
Peer must be marked as seeder only when client has not got metadata
yet. This bug causes aria2 shutdowns connection early when it gets
have message from a peer because it wrongly recognizes the peer as
seeder.
2011-01-06 22:43:34 +09:00
Tatsuhiro Tsujikawa
0a2b1660fa
Removed DownloadContext::dir_. Use PREF_DIR value instead.
2010-12-03 13:08:22 +09:00
Tatsuhiro Tsujikawa
3ee6784b76
Made `make distcheck' pass.
...
We added 2 macros A2_TEST_DIR and A2_TEST_OUT_DIR to pass tests in
`make distcheck`. A2_TEST_DIR refers to test directory. All output
files by unit tests are now created under A2_TEST_OUT_DIR directory.
2010-12-02 22:52:35 +09:00
Tatsuhiro Tsujikawa
476ba70a9f
Moved errorCode_ from RecoverableException to Exception and added errorCode to
...
stackTrace.
Also changed errno to errNum in stackTrace.
2010-11-28 21:36:01 +09:00
Tatsuhiro Tsujikawa
d316a00ade
Replaced RequestGroup::lastUriResult_ with
...
RequestGroup::lastErrorCode_.
2010-11-28 17:00:30 +09:00
Tatsuhiro Tsujikawa
947967fc63
Renamed DownloadErrorCode.h as error_code.h. Renamed
...
downloaderrorcode::Value as error_code::Value.
2010-11-28 16:52:02 +09:00
Tatsuhiro Tsujikawa
e39dd96171
Removed autogenerated files by automake/autoconf.
...
To generate these files, run 'autoreconf -i'.
Since libgnutls.m4 is no longer distributed, we removed
AM_PATH_LIBGNUTLS from configure.ac.
2010-11-27 23:31:17 +09:00
Tatsuhiro Tsujikawa
0455cde2a8
2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Removed unused FileEntry::setupDir()
* src/FileEntry.cc
* src/FileEntry.h
* test/FileEntryTest.cc
2010-11-25 12:42:07 +00:00
Tatsuhiro Tsujikawa
63c84509b9
2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed unittest error
* test/OptionHandlerTest.cc
2010-11-25 12:14:17 +00:00
Tatsuhiro Tsujikawa
ea49e9c297
2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Made strings which are only used in comparison plain C strings.
* src/HttpHeader.cc
* src/HttpHeader.h
* src/Netrc.cc
* src/Netrc.h
* test/HttpHeaderTest.cc
2010-11-25 12:13:33 +00:00
Tatsuhiro Tsujikawa
06cd151c4b
2010-11-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Cleaned up Possible Values in usage help. More than 2 values are
delimited by ", ".
* src/NameMatchOptionHandler.h
* src/OptionHandler.cc
* src/OptionHandler.h
* src/OptionHandlerFactory.cc
* src/OptionHandlerImpl.cc
* test/OptionHandlerTest.cc
2010-11-23 14:47:58 +00:00
Tatsuhiro Tsujikawa
694fb307aa
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Replaced StringFormat with fmt
2010-11-20 09:36:14 +00:00
Tatsuhiro Tsujikawa
1eef862cc3
2010-11-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Replaced BNode with DHTBucketTreeNode which is 2 times efficient.
* src/BNode.cc: Removed
* src/BNode.h: Removed
* src/DHTBucketTree.cc
* src/DHTBucketTree.h
* src/DHTRoutingTable.cc
* src/DHTRoutingTable.h
* src/Makefile.am
* test/BNodeTest.cc: Removed
* test/DHTBucketTreeTest.cc
* test/Makefile.am
2010-11-17 15:42:23 +00:00
Tatsuhiro Tsujikawa
d8d159ccd8
2010-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Replaced HttpHeader::responseStatus_ with HttpHeader::statusCode_.
statusCode_ is of type int.
* src/AbstractProxyResponseCommand.cc
* src/FtpNegotiationCommand.cc
* src/HttpHeader.cc
* src/HttpHeader.h
* src/HttpHeaderProcessor.cc
* src/HttpResponse.cc
* src/HttpResponse.h
* src/HttpResponseCommand.cc
* src/HttpSkipResponseCommand.cc
* src/util.cc
* src/util.h
* test/HttpHeaderProcessorTest.cc
* test/HttpHeaderTest.cc
* test/HttpResponseTest.cc
* test/UtilTest.cc
2010-11-15 12:52:03 +00:00
Tatsuhiro Tsujikawa
1372ac51ad
2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added .cc file for classes/structs that only provided by header
file. Defined non-POD classes' ctor, dtor in .cc file. Moved
implementation code in header file to .cc file for major
classes/strucsts.
2010-11-14 07:17:55 +00:00
Tatsuhiro Tsujikawa
93e5dbed32
2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Removed SharedHandle::isNull(). Instead we added operator* and
operator unspecified_bool_type. Removed use of WeakHandle and
replaced with raw pointer.
2010-11-12 12:48:48 +00:00
Tatsuhiro Tsujikawa
bc98e39fe5
2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
To match the behavior of friend operator functions in
SharedHandle.h to std::tr1::shared_ptr, we intentionally broke
these functions and modified code so that our code does not depend
on old behavior.
* src/AbstractCommand.cc
* src/DHTAbstractNodeLookupTask.h
* src/DHTBucket.cc
* src/DHTMessageReceiver.cc
* src/DHTNodeLookupEntry.cc
* src/DHTRoutingTable.cc
* src/DefaultBtRequestFactory.cc
* src/DefaultPeerStorage.cc
* src/DefaultPieceStorage.cc
* src/DownloadContext.cc
* src/EpollEventPoll.cc
* src/Event.h
* src/HttpConnection.cc
* src/KqueueEventPoll.cc
* src/MultiDiskAdaptor.cc
* src/PeerAbstractCommand.cc
* src/PieceStatMan.cc
* src/PollEventPoll.cc
* src/PortEventPoll.cc
* src/SegmentMan.cc
* src/SelectEventPoll.cc
* src/SelectEventPoll.h
* src/ServerStatMan.cc
* src/SharedHandle.h
* src/UnknownLengthPieceStorage.cc
* src/a2functional.h
* src/option_processing.cc
* src/version_usage.cc
* test/BNodeTest.cc
* test/DHTAnnouncePeerMessageTest.cc
* test/DHTBucketTest.cc
* test/DHTFindNodeMessageTest.cc
* test/DHTGetPeersMessageTest.cc
* test/DHTIDCloserTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTPingMessageTest.cc
* test/DefaultBtRequestFactoryTest.cc
* test/DefaultPeerStorageTest.cc
* test/SequentialPickerTest.cc
* test/SingletonHolderTest.cc
2010-11-11 07:33:43 +00:00
Tatsuhiro Tsujikawa
89f997ec0d
2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Replaced MessageDigestContext with MessageDigest. Cleaned up
unnecessary functions in MessageDigestHelper.
* src/BtPieceMessage.cc
* src/Checksum.h
* src/DHTTokenTracker.cc
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/HashFuncEntry.h
* src/IteratableChecksumValidator.cc
* src/IteratableChecksumValidator.h
* src/IteratableChunkChecksumValidator.cc
* src/IteratableChunkChecksumValidator.h
* src/LibgcryptMessageDigestImpl.cc
* src/LibgcryptMessageDigestImpl.h
* src/LibsslMessageDigestImpl.cc
* src/LibsslMessageDigestImpl.h
* src/MSEHandshake.cc
* src/MSEHandshake.h
* src/Makefile.am
* src/MessageDigest.cc
* src/MessageDigest.h
* src/MessageDigestHelper.cc
* src/MessageDigestHelper.h
* src/MessageDigestImpl.h
* src/MetalinkParserController.cc
* src/Piece.cc
* src/Piece.h
* src/UTMetadataDataExtensionMessage.cc
* src/bittorrent_helper.cc
* src/messageDigest.cc: Removed
* src/messageDigest.h: Removed
* src/util.cc
* src/version_usage.cc
* test/BittorrentHelperTest.cc
* test/GZipDecoderTest.cc
* test/GZipDecodingStreamFilterTest.cc
* test/IteratableChecksumValidatorTest.cc
* test/IteratableChunkChecksumValidatorTest.cc
* test/Makefile.am
* test/MessageDigestHelperTest.cc
* test/MessageDigestTest.cc
* test/Metalink2RequestGroupTest.cc
* test/MetalinkProcessorTest.cc
* test/PieceTest.cc
* test/TestUtil.cc
* test/TestUtil.h
* test/UTMetadataDataExtensionMessageTest.cc
* test/UTMetadataPostDownloadHandlerTest.cc
2010-11-11 02:56:24 +00:00
Tatsuhiro Tsujikawa
35cc4ed1e7
2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Return empty range if byte-range-resp-spec or instance-length is
"*" in Content-Range header to prevent aria2 from emitting error
failing to convert "*" to a integer.
* src/HttpHeader.cc
* test/HttpHeaderTest.cc
2010-10-31 07:56:01 +00:00
Tatsuhiro Tsujikawa
2b458da480
2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Made #include guard consistent for c++ header files.
2010-10-31 07:23:53 +00:00
Tatsuhiro Tsujikawa
236e64cb25
2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Use unnamed namespace instead of static keyword.
* src/AbstractCommand.cc
* src/AdaptiveURISelector.cc
* src/Base64.cc
* src/BitfieldMan.cc
* src/BtDependency.cc
* src/ConsoleStatCalc.cc
* src/ContentTypeRequestGroupCriteria.cc
* src/CookieStorage.cc
* src/DHTMessageFactoryImpl.cc
* src/DHTRoutingTableDeserializer.cc
* src/DefaultBtAnnounce.cc
* src/DefaultBtProgressInfoFile.cc
* src/DefaultPeerStorage.cc
* src/DefaultPieceStorage.cc
* src/DownloadCommand.cc
* src/DownloadEngine.cc
* src/EpollEventPoll.cc
* src/ExpatMetalinkProcessor.cc
* src/ExpatXmlRpcRequestProcessor.cc
* src/FileEntry.cc
* src/HttpRequest.cc
* src/HttpRequestCommand.cc
* src/HttpResponseCommand.cc
* src/KqueueEventPoll.cc
* src/LongestSequencePieceSelector.cc
* src/MetalinkParserStateV3Impl.cc
* src/MetalinkParserStateV4Impl.cc
* src/MultiDiskAdaptor.cc
* src/MultiUrlRequestInfo.cc
* src/OptionParser.cc
* src/PeerSessionResource.cc
* src/PortEventPoll.cc
* src/Request.cc
* src/RequestGroupMan.cc
* src/SelectEventPoll.cc
* src/SessionSerializer.cc
* src/SimpleLogFormatter.cc
* src/Sqlite3CookieParser.cc
* src/TrackerWatcherCommand.cc
* src/XML2SAXMetalinkProcessor.cc
* src/Xml2XmlRpcRequestProcessor.cc
* src/XmlRpcMethod.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcResponse.cc
* src/base32.cc
* src/bencode2.cc
* src/bittorrent_helper.cc
* src/download_helper.cc
* src/main.cc
* src/messageDigest.cc
* src/option_processing.cc
* src/util.cc
* test/AnnounceListTest.cc
* test/BtRegistryTest.cc
* test/DHTBucketTest.cc
* test/DHTRoutingTableTest.cc
* test/DefaultBtAnnounceTest.cc
* test/FileEntryTest.cc
* test/FtpConnectionTest.cc
* test/MSEHandshakeTest.cc
* test/MagnetTest.cc
* test/XmlRpcMethodTest.cc
* test/array_funTest.cc
2010-10-30 16:02:15 +00:00
Tatsuhiro Tsujikawa
423ec26fe4
2010-10-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Use std::numeric_limits<time_t> instead of checking of
sizeof(time_t).
* src/NsCookieParser.cc
* src/Sqlite3CookieParser.cc
* src/cookie_helper.cc
* test/CookieHelperTest.cc
* test/CookieStorageTest.cc
* test/NsCookieParserTest.cc
2010-10-27 14:54:25 +00:00
Tatsuhiro Tsujikawa
4516736a22
2010-10-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added testcase for File::mkdirs().
* test/FileTest.cc
2010-10-11 15:15:51 +00:00
Tatsuhiro Tsujikawa
96ee327bf3
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed compile error without sqlite3
* test/CookieStorageTest.cc
2010-10-10 14:05:08 +00:00
Tatsuhiro Tsujikawa
f6dbba5427
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Retrieve last access time from sqlite3 cookie database.
* src/CookieStorage.cc
* src/Sqlite3CookieParser.cc
* src/Sqlite3CookieParser.h
* src/Sqlite3CookieParserImpl.cc
* test/Sqlite3CookieParserTest.cc
* test/chromium_cookies.sqlite
* test/cookies.sqlite
2010-10-10 09:53:30 +00:00
Tatsuhiro Tsujikawa
0abd4a2f7b
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Rewritten util::split()
* src/util.h
* test/UtilTest.cc
2010-10-10 06:58:31 +00:00
Tatsuhiro Tsujikawa
1875d7382f
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Replaced util::split(a,b,c) and util::split(a,b) with
util::divide()
* src/ExpatMetalinkProcessor.cc
* src/FtpConnection.cc
* src/HttpHeader.cc
* src/HttpResponse.cc
* src/HttpServer.cc
* src/OptionParser.cc
* src/ParameterizedStringParser.cc
* src/ServerStatMan.cc
* src/magnet.cc
* src/util.cc
* src/util.h
* test/UtilTest.cc
2010-10-10 03:39:00 +00:00
Tatsuhiro Tsujikawa
8e059b66fa
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added util::lowercase() and util::uppercase().
* src/cookie_helper.cc
* src/util.cc
* src/util.h
* test/UtilTest.cc
2010-10-10 02:51:38 +00:00
Tatsuhiro Tsujikawa
788679f0df
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added test cases for util::parseUIntNoThrow() and
util::parseLLIntNoThrow().
* test/UtilTest.cc
2010-10-09 16:58:58 +00:00
Tatsuhiro Tsujikawa
1505671e7b
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Use util::strip() instead of util::trim()
* src/ExpatXmlRpcRequestProcessor.cc
* src/FeatureConfig.cc
* src/HttpHeader.cc
* src/MetalinkParserStateV3Impl.cc
* src/OptionHandlerImpl.h
* src/ServerStatMan.cc
* src/UriListParser.cc
* src/Xml2XmlRpcRequestProcessor.cc
* src/bittorrent_helper.cc
* src/cookie_helper.cc
* src/messageDigest.cc
* src/util.cc
* src/util.h
* test/FeatureConfigTest.cc
* test/HttpRequestTest.cc
* test/UriListParserTest.cc
* test/UtilTest.cc
2010-10-09 16:49:02 +00:00
Tatsuhiro Tsujikawa
dbea00fa9d
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added util::strip()
* src/util.cc
* src/util.h
* test/UtilTest.cc
2010-10-09 16:22:56 +00:00
Tatsuhiro Tsujikawa
f816434d06
2010-10-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added tests to HttpRequestTest about trailing slash of cookie
path.
* test/HttpRequestTest.cc
2010-10-09 14:52:41 +00:00
Tatsuhiro Tsujikawa
8b17d4b276
2010-10-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Rewritten Cookie class and Cookie parser based on
http://tools.ietf.org/html/draft-ietf-httpstate-cookie-14 with
some modifications. When parsing cookie date, match time first so
that it parses asctime() format. The request-path must be ends
with '/' so that request-path '/foo/' path-matches cookie-path
'/foo' and '/foo/' in the proposed algorithm.
* src/Cookie.cc
* src/Cookie.h
* src/CookieParser.cc: Removed
* src/CookieParser.h: Removed
* src/CookieStorage.cc
* src/CookieStorage.h
* src/HttpResponse.cc
* src/Makefile.am
* src/Makefile.in
* src/MultiUrlRequestInfo.cc
* src/NsCookieParser.cc
* src/NsCookieParser.h
* src/Sqlite3CookieParser.cc
* src/Sqlite3CookieParser.h
* src/a2functional.h
* src/cookie_helper.cc
* src/cookie_helper.h
* src/util.cc
* src/util.h
* test/CookieBoxFactoryTest.cc: Removed
* test/CookieHelperTest.cc
* test/CookieParserTest.cc: Removed
* test/CookieStorageTest.cc
* test/CookieTest.cc
* test/HttpRequestTest.cc
* test/Makefile.am
* test/Makefile.in
* test/NsCookieParserTest.cc
* test/Sqlite3CookieParserTest.cc
* test/TestUtil.cc
* test/TestUtil.h
* test/a2functionalTest.cc
* test/chromium_cookies.sqlite
* test/cookies.sqlite
* test/nscookietest.txt
2010-10-09 14:22:49 +00:00
Tatsuhiro Tsujikawa
9b1280f7a3
2010-10-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Supported ANSI C's asctime() format in Time::parseHTTPDate().
Added Time::parseAsctime(). Changed order of application of parse
functions. I could not remember why parseRFC850() was tried first.
* src/TimeA2.cc
* src/TimeA2.h
* test/TimeTest.cc
2010-10-04 15:12:27 +00:00
Tatsuhiro Tsujikawa
5db7b123b5
2010-10-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Use inet_ntoa if inet_ntop is not available. Since inet_ntoa does
not handle IPv6 address, IPv6 support is limited in this
case. Fixed unit test error under mingw32.
* configure.ac
* src/AsyncNameResolver.cc
* src/SocketCore.cc
* src/bittorrent_helper.cc
* test/BittorrentHelperTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTRoutingTableDeserializerTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DefaultBtAnnounceTest.cc
* test/Metalink2RequestGroupTest.cc
* test/UTPexExtensionMessageTest.cc
2010-10-04 14:33:49 +00:00
Tatsuhiro Tsujikawa
584af68e19
2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Execute 5 DHT tasks concurrently in each task queue.
* src/DHTTaskExecutor.cc
* src/DHTTaskExecutor.h
* src/DHTTaskQueueImpl.cc
* src/DHTTaskQueueImpl.h
* src/Makefile.am
* test/DHTTaskExecutorTest.cc
* test/Makefile.am
* test/MockDHTTask.h
2010-10-02 14:38:37 +00:00
Tatsuhiro Tsujikawa
d5e0046f29
2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Rewritten util::escapePath(). Now it does not replace bad chars:it
performs percent-encode against them. util::fixTaintedBasename()
now replaces "/" with "%2F". Added 0x7f as bad chars in
util::detectDirTraversal().
* src/util.cc
* test/UtilTest.cc
2010-10-02 08:20:10 +00:00
Tatsuhiro Tsujikawa
d956ea0b70
2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Non-UTF8 filenames are now percent-encoded. For example, filename
for http://example.org/%90%A2%8AE will be %90%A2%8AE because it is
Shift_JIS. The comments and name in .torrent file in XML-RPC
response are percent-encoded if they are not UTF-8.
* src/FtpNegotiationCommand.cc
* src/HttpRequestCommand.cc
* src/HttpResponseCommand.cc
* src/XmlRpcMethodImpl.cc
* src/bittorrent_helper.cc
* src/util.cc
* src/util.h
* test/BittorrentHelperTest.cc
* test/UtilTest.cc
2010-10-02 07:54:43 +00:00
Tatsuhiro Tsujikawa
6c348f0493
2010-09-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Renamed TripletGet as TupleGet. Renamed TripletNthType as
TupleNthType. Renamed Triplet2Pair as Tuple2Pair.
* src/RequestGroupMan.cc
* src/Triplet.h
* test/TripletTest.cc
2010-09-26 07:23:00 +00:00
Tatsuhiro Tsujikawa
e07f7207fa
2010-09-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Rewritten TripletNthType.
* src/Triplet.h
* test/TripletTest.cc
2010-09-26 06:46:12 +00:00
Tatsuhiro Tsujikawa
aabd7b75f9
2010-09-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Sort usedHosts by least used and faster download speed.
* src/Makefile.am
* src/RequestGroupMan.cc
* src/Triplet.h
* test/Makefile.am
* test/TripletTest.cc
2010-09-26 05:47:12 +00:00
Tatsuhiro Tsujikawa
c56a9bc669
2010-09-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added keys parameter to aria2.tellStatus, aria2.tellActive,
aria2.tellWaiting and aria2.tellStopped XML-RPC method. 'keys' is
array of string. If it is specified, the response contains only
keys in 'keys' array. If 'keys' is empty or not specified, the
response contains all keys. This is useful when you just want
specific keys and avoid unnecessary transfers. For example,
*aria2.tellStatus*("1", ["gid", "status"]) returns 'gid' and
'status' key. Made get*Param() functions XmlRpcRequest's
methods and changed portions of the code that were affected by
this change.
* doc/aria2c.1.txt
* src/Makefile.am
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* src/XmlRpcRequest.cc
* src/XmlRpcRequest.h
* test/XmlRpcMethodTest.cc
2010-09-19 09:49:11 +00:00
Tatsuhiro Tsujikawa
7f92e32e48
2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed compile error without zlib
* test/Makefile.am
2010-09-13 13:43:06 +00:00
Tatsuhiro Tsujikawa
6b6e6bc495
2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Removed ChunkedDecoder. Moved GZipDecodingStreamFilter to under
'if HAVE_LIBZ'.
* src/ChunkedDecoder.cc
* src/ChunkedDecoder.h
* src/Makefile.am
* test/ChunkedDecoderTest.cc
* test/Makefile.am
2010-09-13 12:14:07 +00:00
Tatsuhiro Tsujikawa
58ec84b1e7
2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added missing MockSegment.h to test/Makefile.am
* test/Makefile.am
2010-09-11 14:41:52 +00:00
Tatsuhiro Tsujikawa
9eaf3ccb0f
2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Replaced V_TRUE with A2_V_TRUE. Replaced V_FALSE with A2_V_FALSE.
* src/AbstractCommand.cc
* src/HttpResponseCommand.cc
* src/Option.cc
* src/OptionHandlerFactory.cc
* src/OptionHandlerImpl.h
* src/TrackerWatcherCommand.cc
* src/download_helper.cc
* src/main.cc
* src/prefs.cc
* src/prefs.h
* test/AuthConfigFactoryTest.cc
* test/DefaultBtProgressInfoFileTest.cc
* test/DownloadHelperTest.cc
* test/HttpRequestTest.cc
* test/OptionHandlerTest.cc
* test/UTMetadataPostDownloadHandlerTest.cc
* test/XmlRpcMethodTest.cc
2010-09-11 12:48:03 +00:00
Tatsuhiro Tsujikawa
ec3bd81486
2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Moved URI parser code to uri.h, uri.cc to provide fast URI parser
without Request object initialization.
* src/Makefile.am
* src/Request.cc
* src/uri.cc
* src/uri.h
* test/Makefile.am
* test/RequestTest.cc
* test/UriTest.cc
2010-09-11 09:11:57 +00:00
Tatsuhiro Tsujikawa
bf9fd473bb
2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Allow '@' in username and password embedded in URI. It should be
percent-encoded but many people use their mail address as an
username and forget about PE.
* src/Request.cc
* test/RequestTest.cc
2010-09-08 14:35:30 +00:00
Tatsuhiro Tsujikawa
efbfe4c006
2010-09-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Data from remote server in HTTP/FTP download are now written to
the disk(or memory) through StreamFilter. Decoding chunked and
gziped streams are done cascading StreamFilter.
Removed inefficient 1byte read code.
* src/ChunkedDecodingStreamFilter.cc
* src/ChunkedDecodingStreamFilter.h
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/GZipDecodingStreamFilter.cc
* src/GZipDecodingStreamFilter.h
* src/HttpConnection.cc
* src/HttpDownloadCommand.cc
* src/HttpResponse.cc
* src/HttpResponse.h
* src/HttpResponseCommand.cc
* src/HttpResponseCommand.h
* src/HttpSkipResponseCommand.cc
* src/HttpSkipResponseCommand.h
* src/Makefile.am
* src/NullSinkStreamFilter.cc
* src/NullSinkStreamFilter.h
* src/RequestGroup.cc
* src/SinkStreamFilter.cc
* src/SinkStreamFilter.h
* src/StreamFilter.cc
* src/StreamFilter.h
* test/ChunkedDecodingStreamFilterTest.cc
* test/GZipDecodingStreamFilterTest.cc
* test/HttpResponseTest.cc
* test/Makefile.am
* test/MockSegment.h
2010-09-06 14:29:36 +00:00
Tatsuhiro Tsujikawa
939e4b2038
2010-08-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added test for previous change
* test/NetrcTest.cc
2010-08-31 11:54:44 +00:00
Tatsuhiro Tsujikawa
0968d4fedd
2010-08-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Removed getMissingFastPiece(piece) and getMissingFastPiece(piece,
excludedIndexes) from PieceStorage. Done some code cleanup.
* src/DefaultPieceStorage.h
* src/PieceStorage.h
* src/UnknownLengthPieceStorage.cc
* src/UnknownLengthPieceStorage.h
* test/MockPieceStorage.h
2010-08-29 09:24:17 +00:00
Tatsuhiro Tsujikawa
4b2d1deff6
2010-08-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Pass excludedIndexes when getting metadata piece.
* src/UTMetadataRequestFactory.cc
* test/UTMetadataRequestFactoryTest.cc
2010-08-29 09:22:06 +00:00
Tatsuhiro Tsujikawa
e997903e5d
2010-08-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added a sets of overloaded functions for
PieceStorage::getMissingPiece() and getMissingFastPiece() to get
multiple pieces more efficiently.
* src/DefaultBtInteractive.cc
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/PieceStorage.h
* src/UnknownLengthPieceStorage.cc
* src/UnknownLengthPieceStorage.h
* test/DefaultPieceStorageTest.cc
* test/MockPieceStorage.h
2010-08-29 08:53:19 +00:00
Tatsuhiro Tsujikawa
d5bb40ce9e
2010-08-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Wait data arrives at clientSocket_ in
FtpConnectionTest::testReceiveEpsvResponse().
* test/FtpConnectionTest.cc
2010-08-28 04:40:51 +00:00
Tatsuhiro Tsujikawa
835de071f2
2010-08-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Enter end game mode as soon as all pieces are assigned to peer to
avoid substantial slow down at the very last stage of download.
* src/DefaultBtInteractive.cc
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/PieceStorage.h
* src/UnknownLengthPieceStorage.h
* test/MockPieceStorage.h
2010-08-26 14:49:40 +00:00
Tatsuhiro Tsujikawa
26bf5ab5e2
2010-08-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added --bt-tracker and --bt-exclude-tracker option. In
--bt-tracker option, you can specify comma separated list of
additional BitTorrent tracker's announce URI. These URIs are not
affected by --bt-exclude-tracker option because they are added
after URIs in --bt-exclude-tracker option are removed. In
--bt-exclude-tracker option, you can specify comma separated list
of BitTorrent tracker's announce URI to remove. You can use
special value '*' which matches all URIs, thus removes all
announce URIs. When specifying '*' in shell command-line, don't
forget to escape or quote it.
* src/BtDependency.cc
* src/OptionHandlerFactory.cc
* src/UTMetadataPostDownloadHandler.cc
* src/bittorrent_helper.cc
* src/bittorrent_helper.h
* src/download_helper.cc
* src/download_helper.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/BittorrentHelperTest.cc
* test/DownloadHelperTest.cc
2010-08-24 14:21:12 +00:00
Tatsuhiro Tsujikawa
26d6692376
2010-08-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added IPv6 DHT. Added --dht-entry-porint6, --dht-file-path6,
--dht-listen-addr6 and --enable-dht6 option. IPv6 DHT is disabled
by default. To use IPv6 DHT, you need to use --enable-dht6 and
specify a global unicast address to --dht-listen-addr6. IPv6 DHT
is highly experimental.
* src/BtSetup.cc
* src/DHTAutoSaveCommand.cc
* src/DHTAutoSaveCommand.h
* src/DHTConnectionImpl.cc
* src/DHTConnectionImpl.h
* src/DHTEntryPointNameResolveCommand.cc
* src/DHTFindNodeReplyMessage.cc
* src/DHTFindNodeReplyMessage.h
* src/DHTGetPeersMessage.cc
* src/DHTGetPeersReplyMessage.cc
* src/DHTGetPeersReplyMessage.h
* src/DHTMessageFactory.h
* src/DHTMessageFactoryImpl.cc
* src/DHTMessageFactoryImpl.h
* src/DHTMessageTracker.cc
* src/DHTRegistry.cc
* src/DHTRegistry.h
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableDeserializer.h
* src/DHTRoutingTableSerializer.cc
* src/DHTRoutingTableSerializer.h
* src/DHTSetup.cc
* src/DHTSetup.h
* src/FtpConnection.cc
* src/LpdMessageReceiver.cc
* src/OptionHandlerFactory.cc
* src/OptionHandlerImpl.h
* src/PeerInteractionCommand.cc
* src/RequestGroup.cc
* src/SocketCore.cc
* src/SocketCore.h
* src/bittorrent_helper.cc
* src/bittorrent_helper.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/DHTConnectionImplTest.cc
* test/DHTFindNodeReplyMessageTest.cc
* test/DHTGetPeersMessageTest.cc
* test/DHTGetPeersReplyMessageTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTRoutingTableDeserializerTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/LpdMessageDispatcherTest.cc
* test/MockDHTMessageFactory.h
2010-08-07 14:15:21 +00:00
Tatsuhiro Tsujikawa
c685ea9de9
2010-08-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added support for peers6 key in tracker response. Added added6,
added6.f and dropped6 in ut_pex.
* src/BtAnnounce.cc
* src/BtAnnounce.h
* src/DefaultBtAnnounce.cc
* src/UTPexExtensionMessage.cc
* src/UTPexExtensionMessage.h
* test/DefaultBtAnnounceTest.cc
* test/UTPexExtensionMessageTest.cc
2010-08-05 11:54:44 +00:00
Tatsuhiro Tsujikawa
785a27f6e8
2010-08-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Add only gracefully disconnected peer to ut_pex dropped list. Add
incoming dropped list to PeerStorage.
* src/DefaultBtInteractive.cc
* src/DefaultPeerStorage.cc
* src/InitiatorMSEHandshakeCommand.cc
* src/Peer.cc
* src/Peer.h
* src/PeerConnection.cc
* src/PeerConnection.h
* src/PeerInteractionCommand.cc
* src/PeerReceiveHandshakeCommand.cc
* src/ReceiverMSEHandshakeCommand.cc
* src/UTPexExtensionMessage.cc
* test/DefaultPeerStorageTest.cc
* test/UTPexExtensionMessageTest.cc
2010-08-04 15:00:38 +00:00
Tatsuhiro Tsujikawa
2176b68116
2010-08-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Rewritten ut_pex peer selection.
* src/DefaultBtInteractive.cc
* src/DefaultPeerStorage.cc
* src/DefaultPeerStorage.h
* src/PeerStorage.h
* src/UTPexExtensionMessage.h
* test/DefaultPeerStorageTest.cc
* test/MockPeerStorage.h
* test/UTPexExtensionMessageTest.cc
2010-08-04 12:25:46 +00:00
Tatsuhiro Tsujikawa
2bd5020f81
2010-08-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added bittorrent::packcompact() which replaces
bittorrent::createcompact() and supports IPv6 addresses. Rewritten
bittorrent::unpackcompact() and bittorrent::extractPeer() to
support IPv6 addresses. Fixed added.f flags in ut_pex.
* src/BtConstants.h
* src/DHTFindNodeReplyMessage.cc
* src/DHTGetPeersReplyMessage.cc
* src/DHTMessageFactoryImpl.cc
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableSerializer.cc
* src/DHTTokenTracker.cc
* src/DefaultBtAnnounce.cc
* src/UTPexExtensionMessage.cc
* src/bittorrent_helper.cc
* src/bittorrent_helper.h
* test/BittorrentHelperTest.cc
* test/DHTFindNodeReplyMessageTest.cc
* test/DHTGetPeersReplyMessageTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DefaultExtensionMessageFactoryTest.cc
* test/UTPexExtensionMessageTest.cc
2010-08-03 11:44:24 +00:00
Tatsuhiro Tsujikawa
7958ce4366
2010-07-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added FTP EPSV and EPRT command support. aria2 issues these
commands when address family of local socket is AF_INET6.
* src/FtpConnection.cc
* src/FtpConnection.h
* src/FtpNegotiationCommand.cc
* src/FtpNegotiationCommand.h
* src/SocketCore.cc
* src/SocketCore.h
* test/FtpConnectionTest.cc
2010-07-30 14:45:35 +00:00
Tatsuhiro Tsujikawa
27e96877b7
2010-07-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Rewritten check for fallocate using AC_COMPILE_IFELSE.
* configure.ac
* m4/fallocate.m4
2010-07-27 14:37:25 +00:00
Tatsuhiro Tsujikawa
07f91a28de
2010-07-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed compile error with OSX g++ 4.0.1
* src/FileEntry.h
* test/FileEntryTest.cc
2010-07-18 15:49:53 +00:00
Tatsuhiro Tsujikawa
cd13647abe
2010-07-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Pass maxSplitSize as an argument, instead of member variable of
DefaultPieceStorage. SegmentMan::getSegment(cuid_t,size_t index)
was renamed to SegmentMan::getSegmentWithIndex(...)
* src/AbstractCommand.cc
* src/AbstractCommand.h
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/DownloadCommand.cc
* src/FtpNegotiationCommand.cc
* src/HttpResponseCommand.cc
* src/PieceStorage.h
* src/RequestGroup.cc
* src/SegmentMan.cc
* src/SegmentMan.h
* src/UnknownLengthPieceStorage.cc
* src/UnknownLengthPieceStorage.h
* test/MockPieceStorage.h
* test/SegmentManTest.cc
2010-07-17 14:36:18 +00:00
Tatsuhiro Tsujikawa
906215317a
2010-07-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added --conditional-get option. Download file only when the local
file is older than remote file. This function only works with
HTTP(S) downloads only. It does not work if file size is specified
in Metalink. It also ignores Content-Disposition header. If a
control file exists, this option will be ignored. This function
uses If-Modified-Since header to get only newer file
conditionally. When getting modification time of local file, it
uses user supplied filename(see --out option) or filename part in
URI if --out is not specified.
* doc/aria2c.1.txt
* src/HttpHeader.cc
* src/HttpHeader.h
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpRequestCommand.cc
* src/HttpResponse.cc
* src/HttpResponseCommand.cc
* src/OptionHandlerFactory.cc
* src/TimeA2.cc
* src/TimeA2.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/HttpResponseTest.cc
* test/TimeTest.cc
2010-07-16 14:13:04 +00:00
Tatsuhiro Tsujikawa
55d98cff0b
2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
FeedbackURISelector now tries to select URI whose host is least
used in aria2 globally. Reverted the previous change.
* src/AdaptiveURISelector.cc
* src/AdaptiveURISelector.h
* src/CreateRequestCommand.cc
* src/FeedbackURISelector.cc
* src/FeedbackURISelector.h
* src/FileEntry.cc
* src/FileEntry.h
* src/InOrderURISelector.cc
* src/InOrderURISelector.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/URISelector.h
* src/a2algo.h
* test/FeedbackURISelectorTest.cc
* test/InOrderURISelectorTest.cc
2010-07-15 13:49:02 +00:00
Tatsuhiro Tsujikawa
1ddaaf7614
2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added --min-split-size=SIZE option. aria2 does not split less
than 2*SIZE byte range. For example, let's consider downloading
20MiB file. If SIZE is 10M, aria2 can split file into 2 range
[0-10MiB) and [10MiB-20MiB) and download it using 2 sources(if
--split >= 2, of course). If SIZE is 15M, since 2*15M > 20MiB,
aria2 does not split file and download it using 1 source.
* src/BitfieldMan.cc
* src/BitfieldMan.h
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/OptionHandlerFactory.cc
* src/RequestGroup.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/BitfieldManTest.cc
* test/SegmentManTest.cc
2010-07-15 11:39:21 +00:00
Tatsuhiro Tsujikawa
55748de726
2010-07-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
FeedbackURISelector now tries to chooses URI which is not used in
aria2 globally. If it is possible, it may return used URI.
* src/AdaptiveURISelector.cc
* src/AdaptiveURISelector.h
* src/CreateRequestCommand.cc
* src/FeedbackURISelector.cc
* src/FeedbackURISelector.h
* src/FileEntry.cc
* src/FileEntry.h
* src/InOrderURISelector.cc
* src/InOrderURISelector.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/URISelector.h
* test/FeedbackURISelectorTest.cc
* test/InOrderURISelectorTest.cc
2010-07-14 14:10:33 +00:00
Tatsuhiro Tsujikawa
c99960aa33
2010-07-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added --max-connection-per-server=NUM option. The default value of
NUM is 1. This option limits the number of connections allowed to
one server for each download. This means when NUM is 2 and 1 URI
is provided, even if you specified -s 5, aria2 establishes 2
connections. Default value of -j option is changed from 5 to 2.
* src/BtDependency.cc
* src/CreateRequestCommand.cc
* src/FileEntry.cc
* src/FileEntry.h
* src/FtpNegotiationCommand.cc
* src/HttpResponseCommand.cc
* src/Metalink2RequestGroup.cc
* src/OptionHandlerFactory.cc
* src/TrackerWatcherCommand.cc
* src/download_helper.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/DownloadHelperTest.cc
* test/FileEntryTest.cc
2010-07-14 11:39:05 +00:00
Tatsuhiro Tsujikawa
8274432f14
2010-07-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Set end byte in Range header if start byte > 0 to get more chance
to pool socket.
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/DownloadCommand.cc
* src/HttpDownloadCommand.cc
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpRequestCommand.cc
* src/PieceStorage.h
* src/UnknownLengthPieceStorage.h
* test/DefaultPieceStorageTest.cc
* test/HttpRequestTest.cc
* test/MockPieceStorage.h
2010-07-12 11:55:23 +00:00
Tatsuhiro Tsujikawa
20cea7f693
2010-07-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed ChunkedDecoder. It does not read trailer and final CRLF.
* src/ChunkedDecoder.cc
* src/ChunkedDecoder.h
* test/ChunkedDecoderTest.cc
2010-07-11 14:15:36 +00:00
Tatsuhiro Tsujikawa
f285f66ac8
2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Send each CWD component of FTP URI in separate CWD command as
described in RFC1738.
* src/FtpConnection.cc
* src/FtpConnection.h
* src/FtpInitiateConnectionCommand.cc
* src/FtpNegotiationCommand.cc
* src/FtpNegotiationCommand.h
* test/FtpConnectionTest.cc
2010-07-09 11:48:59 +00:00
Tatsuhiro Tsujikawa
52a6ea008e
2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed the bug that aria2 cannot handle %2F in FTP URI properly.
If directory component starts with %2F which percent-encode of
'/', client should issue CWD to absolute path, but aria2 does not
do that. It just issues relative path and download fails.
* src/FtpConnection.cc
* test/FtpConnectionTest.cc
2010-07-08 16:40:21 +00:00
Tatsuhiro Tsujikawa
880af94348
2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Increased DOMAIN_EVICTION_TRIGGER to 2000
* src/CookieStorage.cc
* test/CookieStorageTest.cc
2010-07-08 15:20:21 +00:00
Tatsuhiro Tsujikawa
95af338895
2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added Chromium/Google Chrome Cookies file support. Thanks to
gotrunks for original patch.
* src/CookieStorage.cc
* src/Makefile.am
* src/Sqlite3CookieParser.cc
* src/Sqlite3CookieParser.h
* src/Sqlite3CookieParserImpl.cc
* src/Sqlite3CookieParserImpl.h
* src/Sqlite3MozCookieParser.cc: Removed
* src/Sqlite3MozCookieParser.h: Removed
* test/Makefile.am
* test/Sqlite3CookieParserTest.cc
* test/Sqlite3MozCookieParserTest.cc: Removed
* test/chromium_cookies.sqlite
2010-07-08 15:18:15 +00:00
Tatsuhiro Tsujikawa
a5cc350dcf
2010-07-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
When allocating disk space, for Linux system with fallocate()
system call, first check file system supports fallocate. This
just run fallocate with small chunk and see it succeeds or fails.
If it succeeds, use fallocate() to allocate entire file otherwise
fall back to traditional slower method: writing zeros. This
behavior is enabled in --file-allocation=prealloc, so this is
enabled by default for most modern Linux.
* configure.ac
* src/AbstractDiskWriter.cc
* src/AbstractDiskWriter.h
* src/AbstractSingleDiskAdaptor.cc
* src/AdaptiveFileAllocationIterator.cc
* src/AdaptiveFileAllocationIterator.h
* src/DefaultPieceStorage.cc
* src/DiskAdaptor.cc
* src/DiskAdaptor.h
* src/FallocFileAllocationIterator.cc
* src/Makefile.am
* src/MultiFileAllocationIterator.cc
* src/OptionHandlerFactory.cc
* test/FallocFileAllocationIteratorTest.cc
* test/Makefile.am
2010-07-04 15:03:35 +00:00
Tatsuhiro Tsujikawa
569892cad2
2010-06-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed compile error without ssl library.
* test/Metalink2RequestGroupTest.cc
2010-06-28 12:56:11 +00:00
Tatsuhiro Tsujikawa
985bc37c00
2010-06-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Don't set previousUri_ to "" on redirect.
* src/Request.cc: redirectUri()
2010-06-27 14:36:25 +00:00
Tatsuhiro Tsujikawa
9d0eb8c08b
2010-06-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Removed unused getOverflow(). Added assertion in
PiecedSegment::updateWrittenLength() to check updated written
length does not exceed piece length.
* src/GrowSegment.h
* src/PiecedSegment.cc
* src/PiecedSegment.h
* src/Segment.h
* test/SegmentTest.cc
2010-06-26 13:01:52 +00:00
Tatsuhiro Tsujikawa
4736e77acf
2010-06-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Request ut_metadata in end-game mode(in other words, more
aggresively)
* src/HandshakeExtensionMessage.cc
* src/Peer.cc
* src/Peer.h
* src/PeerSessionResource.cc
* src/PeerSessionResource.h
* src/UTMetadataRequestFactory.cc
* test/UTMetadataRequestFactoryTest.cc
2010-06-23 11:55:23 +00:00