Commit Graph

2476 Commits (ad596fa03f470471459f2a098bf6fe7b3b723997)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 332bda83b4 Enable TCP_NODELAY for WebSocket connection. 2012-03-21 02:08:18 +09:00
Tatsuhiro Tsujikawa 0792540bf2 Prefixed notification method name with "aria2." 2012-03-21 01:35:48 +09:00
Tatsuhiro Tsujikawa f4e2c7f060 Added JSON-RPC over WebSocket.
Wslay library must be placed under deps/wslay.
2012-03-20 21:42:09 +09:00
Tatsuhiro Tsujikawa 5bff877eae Fixed assertion failure if Chunked encoding along with Content-Length is used. 2012-03-05 12:45:05 +09:00
Tatsuhiro Tsujikawa e73c3c53ff Fixed clang warning and errors.
Test for the zero-length array with A2_ARRAY_LEN was commented out
since it is only used in unit test code and clang and old gcc 3.4.3
emit error.
2012-03-01 00:02:29 +09:00
Tatsuhiro Tsujikawa 037f1512db Added BufferedFile::getLine() to make reading one line more flexible.
Fixes bug#3495336
2012-02-29 02:50:12 +09:00
Tatsuhiro Tsujikawa c63a524a88 Added .gitignore files 2012-02-27 21:49:01 +09:00
Tatsuhiro Tsujikawa f4e0eae904 Added checkRequiredInteger() to check integer param is in valid range.
Ensure that fileIndex in aria2.changeUri RPC method is greater than or
equal to 1.
2012-02-26 21:49:37 +09:00
Tatsuhiro Tsujikawa ad11d746f0 Only accepts 32 bit integer values from int and i4 elements in XML-RPC.
Fixed overflow in AbstractPaginationRpcMethod::getPaginationRange().
Fixes bug#3494165
2012-02-26 19:45:25 +09:00
Tatsuhiro Tsujikawa 663cfec9f6 Fixed the bug that aria2 does not listen on address given in --interface. 2012-02-22 22:45:01 +09:00
Tatsuhiro Tsujikawa 075ea06ad7 Supported Windows UNC path. 2012-02-19 21:19:11 +09:00
Tatsuhiro Tsujikawa b7dbcea58b Check scheme part in redirected URI more strictly.
The previous implementation mistakenly sees '/abspath?uri=http://foo'
as an absolute URI because it contains '://', but actually it is not.
This change checks scheme part is constructed in the allowed character
set described in RFC 3986 Section 3.1.
2012-02-15 01:40:12 +09:00
Tatsuhiro Tsujikawa 9e302b86df Code cleanup: use empty() to check size() == 0 2012-02-12 23:21:25 +09:00
Tatsuhiro Tsujikawa 7dc2b9ff16 Allow missing params in XML-RPC request.
Now following request is legal:

<methodCall>
  <methodName>aria2.getVersion</methodName>
</methodCall>
2012-02-12 23:13:21 +09:00
Tatsuhiro Tsujikawa 9b7e4219d9 Reserve PeerConnection's buffer capacity according to number of pieces.
If the number of pieces gets bigger, the length of Bitfield message
payload exceeds the initial buffer capacity of PeerConnection, which
is MAX_PAYLOAD_LEN.  We expand buffer as necessary so that
PeerConnection can receive the Bitfield message.
2012-02-09 01:51:42 +09:00
Tatsuhiro Tsujikawa f2d55f0edc Added --deferred-input option.
If true is given to --deferred-input option, aria2 does not read all
URIs and options from file specified by -i option at startup, but it
reads one by one when it needs later. This may reduce memory usage if
input file contains a lot of URIs to download. If false is given,
aria2 reads all URIs and options at startup. This option defaults to
false.
2012-02-05 18:57:16 +09:00
Tatsuhiro Tsujikawa a6803c21b5 Support network-path reference in HTTP redirect. 2012-01-11 02:17:38 +09:00
Tatsuhiro Tsujikawa 2997fa0631 Refactored splitNsName 2012-01-11 02:04:20 +09:00
Tatsuhiro Tsujikawa 3b1834e633 Avoid strlen in util::streq, util::strieq, util::startsWith and util::istartsWith 2012-01-11 01:50:35 +09:00
Tatsuhiro Tsujikawa b340c25164 Code cleanup 2012-01-11 01:23:24 +09:00
Tatsuhiro Tsujikawa b6fd4366fe Use short form of util::startsWith and util::endsWith 2012-01-11 01:17:51 +09:00
Tatsuhiro Tsujikawa 9331f6a43d Removed static const char[] as much as possible.
Provided convenient functions for streq, strieq, startsWith,
istartsWith, endsWith, iendsWith to support this move.
2012-01-11 01:03:38 +09:00
Tatsuhiro Tsujikawa db86ffbca9 Fixed compile error without libnettle, libgcrypt and openssl 2012-01-08 19:10:55 +09:00
Tatsuhiro Tsujikawa 1c292f469e aria2 now doesn't assume download's completed just because file size matched
The only exception is zero-length file.  If server tells file is
zero-length and --checksum option is given, aria2 now correctly checks
its checksum. There is one known issue: If downloaded file is
zero-length file and .aria2 file exists, it will not be deleted on
successful verification, because .aria2 file is not loaded.
2012-01-08 17:46:03 +09:00
Tatsuhiro Tsujikawa b6f8a3dbb3 Use std::ifstream instead of file descriptor for generateRandomDataUrandom()
Usually required random bytes are short, it is advantageous to use
std::ifstream which is buffered I/O rather than read() syscall.
2012-01-08 01:21:42 +09:00
Tatsuhiro Tsujikawa 46e59c4cc3 Fixed the bug that --checksum is not working. 2012-01-08 01:15:58 +09:00
Tatsuhiro Tsujikawa 4ff29f802f Moved PeerConnection.{h,cc} to BitTorrent resources 2012-01-08 01:09:58 +09:00
Tatsuhiro Tsujikawa 63325cfd06 Fixed compile error without libnettle, libgcrypt and openssl. 2012-01-08 01:00:02 +09:00
Tatsuhiro Tsujikawa e6c44871c8 Fixed the bug that log file is not created if there is warning before log open
Use LogFactory::reconfigure() to reopen log file after setting log
filename from option.
2011-12-27 17:14:29 +09:00
Tatsuhiro Tsujikawa 973e0df748 Fixed compile error on openbsd 2011-12-26 01:00:15 +09:00
Tatsuhiro Tsujikawa deb0983ab4 Fixed compile error on android (which does not LFS support) 2011-12-26 00:10:27 +09:00
Tatsuhiro Tsujikawa 52155b1860 No retry for close() with EINTR. Also reverted changes in d5ffa253. 2011-12-25 23:38:36 +09:00
ITriskTI aa070bc683 Update src/version_usage.cc 2011-12-12 16:09:45 +03:00
Tatsuhiro Tsujikawa d4e9b07719 Fixed compile error without BitTorrent support 2011-12-11 03:13:33 +09:00
Tatsuhiro Tsujikawa c8191700b1 Fixed compile error without BitTorrent and Metalink support 2011-12-11 00:08:13 +09:00
Tatsuhiro Tsujikawa 8fe92517d9 Removed deleted source file entry 2011-12-10 19:26:36 +09:00
Tatsuhiro Tsujikawa 3637291c22 Fixed compile warning/error with mingw32 2011-12-10 19:06:09 +09:00
Tatsuhiro Tsujikawa ebc082747c Log filename in the exception when AbstractDiskWriter::closeFile() failed. 2011-12-10 18:03:30 +09:00
Tatsuhiro Tsujikawa 413b61c316 FTP PASV: fixed IPv6 support.
If fake FTP URI cannot be parsed (this should not happen), throw
exception.
2011-12-10 17:57:31 +09:00
Tatsuhiro Tsujikawa d5ffa2532d AbstractDiskWriter::closeFile(): Throw exception if close() failed.
~AbstractDiskWriter calles closeFile(), but suppresses exception.
MultiDiskAdaptor::closeFile() logs error if child
DiskWriter::closeFile() throws exception. This exception is not
rethrown. If at least one exception is caught,
MultiDiskAdaptor::closeFile() throws new DlAbortEx.
RequestGroupMan::closeFile() just logs exception and suppress each
exception. Generally, don't call closeFile() in destructor. If you
need to call it, it must suppress the exception.
2011-12-09 23:32:38 +09:00
Tatsuhiro Tsujikawa 9a6f88c162 Use util::itos() for signed integrals 2011-12-09 21:40:22 +09:00
Tatsuhiro Tsujikawa 31163c6785 Check totalLength of file is less than std::numeric_limits<off_t>::max()
If totalLength is larger than std::numeric_limits<off_t>::max(), throw
DownloadFailureException.
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa 7989cd898d Use int or int32_t instead of size_t where suitable 2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa 30e0e19e67 Code cleanup 2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa f0bcfa822e Use int instead of unsigned int where unsigned int is not needed. 2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa b97a7c8ecf Use int32_t for begin, length in RangeBtMessage 2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa 9d15d732ed Use int32_t for piece length instead of size_t 2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa 12988e5282 Replaced uint64_t with off_t or int64_t.
Since off_t is int64_t with LFS, we cannot take advantage of extra
capacity of uint64_t.
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa f25e67b017 FTP pasv: Use request host when connecting server with http proxy. 2011-12-09 21:37:54 +09:00
Tatsuhiro Tsujikawa 2eed1c3914 Fixed bug which causes segmentation fault when bad piece is got. 2011-12-09 21:34:18 +09:00