With --deferred-input=true, aria2 only reads input file to fill active
download slots, while keeping input file open. Meanwhile,
--save-session saves all download info inside memory, but this does
not take into account of unread item in input file. This will lead to
lose input data in saved session file. Also current BufferedFile
implementation used to read/write input/output file take a lock on
Windows. This effectively prevents session serializer from writing
session data to the same file which is still kept open because of
--deferred-input. See GH-493
This change makes --save-session save only options specified for
download, more specifically, options in command-line, -i file and via
RPC. The other options from conf file and default values are not
saved. This will drastically decrease the size of session file.
Added Option::blank().
Use !Option::blank(name) instead of Option::defined(name) for
the options that take filename.
* src/MultiUrlRequestInfo.cc
* src/Option.cc
* src/Option.h
* src/main.cc
* src/option_processing.cc
* test/OptionTest.cc
To make filename URL-decoded:
* src/HttpResponseCommand.h: Updated doc.
* src/HttpResponseCommand.cc
(determinFilename): Made filename URL-decoded.
* src/FtpInitiateConnectionCommand.cc
(executeInternal): Made filename URL-decoded.
* src/Util.h (urldecode): New function.
* src/Util.cc (urldecode): New function.