Commit Graph

3059 Commits (11ac2c4a8885480b64610089ab0da1c4478e6815)

Author SHA1 Message Date
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 45686860e1 Updated bash_completion 2011-08-02 21:28:32 +09:00
Tatsuhiro Tsujikawa a2669c3097 Updated Chinese (Simplified), Ukrainian and Brazilian Portuguese
translation. Thanks to all translators.
2011-08-02 21:25:38 +09:00
Tatsuhiro Tsujikawa cb14342fc3 Small updates. 2011-08-02 21:21:55 +09:00
Tatsuhiro Tsujikawa 2176066c08 Documented Metalink/HTTP in README.asciidoc 2011-07-31 21:47:56 +09:00
Tatsuhiro Tsujikawa 6e1e481be5 Make --metalink-location option available with --disable-metalink 2011-07-31 21:46:07 +09:00
Tatsuhiro Tsujikawa bd39562939 Updated NEWS for 1.12.1 release. 2011-07-31 18:55:24 +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